From 3dcd5a196db4cf67cd2b8322d6d0311371db28f2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 20 Apr 2012 17:26:40 +0000 Subject: Fix [#31008] IK armature resize goes ugly (Pose mode resize). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 :/ --- source/blender/ikplugin/intern/iksolver_plugin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/ikplugin') 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); -- cgit v1.2.3