diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-20 21:26:40 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-20 21:26:40 +0400 |
commit | 3dcd5a196db4cf67cd2b8322d6d0311371db28f2 (patch) | |
tree | 90a1d0c39af60143cd8a5cf36b44219d92dd7618 | |
parent | b26865ba99a8a9dea483a71b757d9eb2de0f7198 (diff) |
Fix [#31008] IK armature resize goes ugly (Pose mode resize).
This affected legacy solver. Note that even if I don't expect any, this fix *may* break some other IK setups, so animators, please check your IK rigs using legacy solver. ;) Easy to revert if needed, anyway.
Note that iTaSC solver is also buggy with some scaled parent, but here IK'ed bones just can’t get scaled in any way (either from parent or from there own transformation)... Will try to find what's happenning, though the code is even harder than legacy solver to follow :/
-rw-r--r-- | source/blender/ikplugin/intern/iksolver_plugin.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index 41700b96acc..8d4d01b7e97 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -347,11 +347,15 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) /* first set the goal inverse transform, assuming the root of tree was done ok! */ pchan= tree->pchan[0]; - if (pchan->parent) + if (pchan->parent) { /* transform goal by parent mat, so this rotation is not part of the * segment's basis. otherwise rotation limits do not work on the * local transform of the segment itself. */ copy_m4_m4(rootmat, pchan->parent->pose_mat); + /* However, we do not want to get (i.e. reverse) parent's scale, as it generates [#31008] + * kind of nasty bugs... */ + normalize_m4(rootmat); + } else unit_m4(rootmat); copy_v3_v3(rootmat[3], pchan->pose_head); |