Revision: 26568
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26568
Author:   aligorith
Date:     2010-02-03 02:08:37 +0100 (Wed, 03 Feb 2010)

Log Message:
-----------
Spline IK Bugfix:

Spline IK now takes curve-object transforms into account when the 'Chain 
Offset' option is not enabled, since the intention of that feature is to allow 
a chain of bones following the shape of a curve to be placed anywhere in the 
scene.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/armature.c

Modified: trunk/blender/source/blender/blenkernel/intern/armature.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/armature.c   2010-02-03 
00:54:26 UTC (rev 26567)
+++ trunk/blender/source/blender/blenkernel/intern/armature.c   2010-02-03 
01:08:37 UTC (rev 26568)
@@ -1892,6 +1892,12 @@
                
                /* tail endpoint */
                if ( where_on_path(ikData->tar, tree->points[index], vec, dir, 
NULL, &rad) ) {
+                       /* apply curve's object-mode transforms to the position 
+                        * unless the option to allow curve to be positioned 
elsewhere is activated (i.e. no root)
+                        */
+                       if ((ikData->flag & CONSTRAINT_SPLINEIK_NO_ROOT) == 0)
+                               mul_m4_v3(ikData->tar->obmat, vec);
+                       
                        /* convert the position to pose-space, then store it */
                        mul_m4_v3(ob->imat, vec);
                        interp_v3_v3v3(poseTail, pchan->pose_tail, vec, 
tailBlendFac);
@@ -1902,6 +1908,12 @@
                
                /* head endpoint */
                if ( where_on_path(ikData->tar, tree->points[index+1], vec, 
dir, NULL, &rad) ) {
+                       /* apply curve's object-mode transforms to the position 
+                        * unless the option to allow curve to be positioned 
elsewhere is activated (i.e. no root)
+                        */
+                       if ((ikData->flag & CONSTRAINT_SPLINEIK_NO_ROOT) == 0)
+                               mul_m4_v3(ikData->tar->obmat, vec);
+                       
                        /* store the position, and convert it to pose space */
                        mul_m4_v3(ob->imat, vec);
                        VECCOPY(poseHead, vec);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to