forked from bartvdbraak/blender
fix [#37032] Blener crashes when parent to new object
This commit is contained in:
parent
cb6e795a47
commit
830974bc1e
@ -2665,7 +2665,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
|
|||||||
case PARBONE:
|
case PARBONE:
|
||||||
{
|
{
|
||||||
// parent this to a bone
|
// parent this to a bone
|
||||||
Bone *parent_bone = BKE_armature_find_bone_name( (bArmature *)(blenderchild->parent)->data, blenderchild->parsubstr);
|
Bone *parent_bone = BKE_armature_find_bone_name(BKE_armature_from_object(blenderchild->parent),
|
||||||
|
blenderchild->parsubstr);
|
||||||
|
|
||||||
if (parent_bone) {
|
if (parent_bone) {
|
||||||
KX_BoneParentRelation *bone_parent_relation = KX_BoneParentRelation::New(parent_bone);
|
KX_BoneParentRelation *bone_parent_relation = KX_BoneParentRelation::New(parent_bone);
|
||||||
|
Loading…
Reference in New Issue
Block a user