[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45818] trunk/blender/source/blender/ ikplugin/intern/iksolver_plugin.c: Fix [#31008] IK armature resize goes ugly (Pose mode resize).

Bastien Montagne montagne29 at wanadoo.fr
Fri Apr 20 19:26:40 CEST 2012


Revision: 45818
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45818
Author:   mont29
Date:     2012-04-20 17:26:40 +0000 (Fri, 20 Apr 2012)
Log Message:
-----------
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?\226?\128?\153t 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 :/

Modified Paths:
--------------
    trunk/blender/source/blender/ikplugin/intern/iksolver_plugin.c

Modified: trunk/blender/source/blender/ikplugin/intern/iksolver_plugin.c
===================================================================
--- trunk/blender/source/blender/ikplugin/intern/iksolver_plugin.c	2012-04-20 16:55:47 UTC (rev 45817)
+++ trunk/blender/source/blender/ikplugin/intern/iksolver_plugin.c	2012-04-20 17:26:40 UTC (rev 45818)
@@ -347,11 +347,15 @@
 
 	/* 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);




More information about the Bf-blender-cvs mailing list