diff options
Diffstat (limited to 'source/blender/ikplugin')
-rw-r--r-- | source/blender/ikplugin/intern/iksolver_plugin.c | 4 | ||||
-rw-r--r-- | source/blender/ikplugin/intern/itasc_plugin.cpp | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index 6d99fde9df6..c467e48d21e 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -406,7 +406,7 @@ static void execute_posetree(struct Depsgraph *depsgraph, } copy_v3_v3(rootmat[3], pchan->pose_head); - mul_m4_m4m4(imat, ob->obmat, rootmat); + mul_m4_m4m4(imat, ob->object_to_world, rootmat); invert_m4_m4(goalinv, imat); for (target = tree->targets.first; target; target = target->next) { @@ -465,7 +465,7 @@ static void execute_posetree(struct Depsgraph *depsgraph, /* end effector in world space */ copy_m4_m4(end_pose, pchan->pose_mat); copy_v3_v3(end_pose[3], pchan->pose_tail); - mul_m4_series(world_pose, goalinv, ob->obmat, end_pose); + mul_m4_series(world_pose, goalinv, ob->object_to_world, end_pose); /* blend position */ goalpos[0] = fac * goalpos[0] + mfac * world_pose[3][0]; diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index 9317f14b7f1..2878bbb6da7 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -586,10 +586,10 @@ static bool target_callback(const iTaSC::Timestamp ×tamp, float chanmat[4][4]; copy_m4_m4(chanmat, pchan->pose_mat); copy_v3_v3(chanmat[3], pchan->pose_tail); - mul_m4_series(restmat, target->owner->obmat, chanmat, target->eeRest); + mul_m4_series(restmat, target->owner->object_to_world, chanmat, target->eeRest); } else { - mul_m4_m4m4(restmat, target->owner->obmat, target->eeRest); + mul_m4_m4m4(restmat, target->owner->object_to_world, target->eeRest); } /* blend the target */ blend_m4_m4m4(tarmat, restmat, tarmat, constraint->enforce); @@ -620,10 +620,10 @@ static bool base_callback(const iTaSC::Timestamp ×tamp, ikscene->baseFrame.setValue(&chanmat[0][0]); /* iTaSC armature is scaled to object scale, scale the base frame too */ ikscene->baseFrame.p *= ikscene->blScale; - mul_m4_m4m4(rootmat, ikscene->blArmature->obmat, chanmat); + mul_m4_m4m4(rootmat, ikscene->blArmature->object_to_world, chanmat); } else { - copy_m4_m4(rootmat, ikscene->blArmature->obmat); + copy_m4_m4(rootmat, ikscene->blArmature->object_to_world); ikscene->baseFrame = iTaSC::F_identity; } next.setValue(&rootmat[0][0]); @@ -1065,7 +1065,7 @@ static void convert_pose(IK_Scene *ikscene) int a, joint; /* assume uniform scaling and take Y scale as general scale for the armature */ - scale = len_v3(ikscene->blArmature->obmat[1]); + scale = len_v3(ikscene->blArmature->object_to_world[1]); rot = ikscene->jointArray(0); for (joint = a = 0, ikchan = ikscene->channels; a < ikscene->numchan && joint < ikscene->numjoint; @@ -1105,7 +1105,7 @@ static void BKE_pose_rest(IK_Scene *ikscene) int a, joint; /* assume uniform scaling and take Y scale as general scale for the armature */ - scale = len_v3(ikscene->blArmature->obmat[1]); + scale = len_v3(ikscene->blArmature->object_to_world[1]); /* rest pose is 0 */ SetToZero(ikscene->jointArray); /* except for transY joints */ @@ -1183,7 +1183,7 @@ static IK_Scene *convert_tree( } ikscene->blArmature = ob; /* assume uniform scaling and take Y scale as general scale for the armature */ - ikscene->blScale = len_v3(ob->obmat[1]); + ikscene->blScale = len_v3(ob->object_to_world[1]); ikscene->blInvScale = (ikscene->blScale < KDL::epsilon) ? 0.0f : 1.0f / ikscene->blScale; std::string joint; @@ -1667,7 +1667,7 @@ static void create_scene(struct Depsgraph *depsgraph, Scene *scene, Object *ob, static int init_scene(Object *ob) { /* check also if scaling has changed */ - float scale = len_v3(ob->obmat[1]); + float scale = len_v3(ob->object_to_world[1]); IK_Scene *scene; if (ob->pose->ikdata) { |