diff options
Diffstat (limited to 'source/blender/collada/SkinInfo.cpp')
-rw-r--r-- | source/blender/collada/SkinInfo.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp index edc8981deab..99a4f024f77 100644 --- a/source/blender/collada/SkinInfo.cpp +++ b/source/blender/collada/SkinInfo.cpp @@ -151,7 +151,7 @@ void SkinInfo::set_controller(const COLLADAFW::SkinController* co) // called from write_controller Object *SkinInfo::create_armature(Scene *scene) { - ob_arm = bc_add_object(scene, OB_ARMATURE, NULL); + ob_arm = add_object(scene, OB_ARMATURE); return ob_arm; } @@ -178,7 +178,7 @@ bool SkinInfo::get_joint_inv_bind_matrix(float inv_bind_mat[][4], COLLADAFW::Nod return false; } -Object *SkinInfo::BKE_armature_from_object() +Object *SkinInfo::get_armature() { return ob_arm; } @@ -218,11 +218,10 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique Scene *scene = CTX_data_scene(C); ModifierData *md = ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Armature); - ArmatureModifierData *amd = (ArmatureModifierData *)md; - amd->object = ob_arm; + ((ArmatureModifierData *)md)->object = ob_arm; copy_m4_m4(ob->obmat, bind_shape_matrix); - BKE_object_apply_mat4(ob, ob->obmat, 0, 0); + object_apply_mat4(ob, ob->obmat, 0, 0); #if 1 bc_set_parent(ob, ob_arm, C); #else @@ -230,7 +229,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique ob->parent = ob_arm; ob->partype = PAROBJECT; - BKE_object_workob_calc_parent(scene, ob, &workob); + what_does_parent(scene, ob, &workob); invert_m4_m4(ob->parentinv, workob.obmat); ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA; @@ -240,7 +239,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL); #endif - amd->deformflag = ARM_DEF_VGROUP; + ((bArmature*)ob_arm->data)->deformflag = ARM_DEF_VGROUP; // create all vertex groups std::vector<JointData>::iterator it; @@ -289,7 +288,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique bPoseChannel *SkinInfo::get_pose_channel_from_node(COLLADAFW::Node *node) { - return BKE_pose_channel_find_name(ob_arm->pose, bc_get_joint_name(node)); + return get_pose_channel(ob_arm->pose, bc_get_joint_name(node)); } void SkinInfo::set_parent(Object *_parent) |