Revision: 53264
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53264
Author:   ton
Date:     2012-12-22 11:08:25 +0000 (Sat, 22 Dec 2012)
Log Message:
-----------
Small tweak in the new "Relative Parent" option for Bones that have 
Object-children:

- Transform now is relative to the bone root.

For backwards compatibility this transform was set to the tip for parenting... 

Now the new parenting option uses the root, the old one still the tip.
I've noted in the code to check on a version patch, to make it consistent.

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

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c     2012-12-22 
09:37:37 UTC (rev 53263)
+++ trunk/blender/source/blender/blenkernel/intern/object.c     2012-12-22 
11:08:25 UTC (rev 53264)
@@ -1839,15 +1839,19 @@
        }
 
        /* get bone transform */
-       if (pchan->bone->flag & BONE_RELATIVE_PARENTING)
+       if (pchan->bone->flag & BONE_RELATIVE_PARENTING) {
+               /* the new option uses the root - expected bahaviour, but 
differs from old... */
+               /* XXX check on version patching? */
                copy_m4_m4(mat, pchan->chan_mat);
-       else
+       }
+       else {
                copy_m4_m4(mat, pchan->pose_mat);
 
-       /* but for backwards compatibility, the child has to move to the tail */
-       copy_v3_v3(vec, mat[1]);
-       mul_v3_fl(vec, pchan->bone->length);
-       add_v3_v3(mat[3], vec);
+               /* but for backwards compatibility, the child has to move to 
the tail */
+               copy_v3_v3(vec, mat[1]);
+               mul_v3_fl(vec, pchan->bone->length);
+               add_v3_v3(mat[3], vec);
+       }
 }
 
 static void give_parvert(Object *par, int nr, float vec[3])

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

Reply via email to