Revision: 17452
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17452
Author:   theeth
Date:     2008-11-14 04:52:04 +0100 (Fri, 14 Nov 2008)

Log Message:
-----------
Stroke conversion wasn't quite ok with unaligned armatures.

Last bugfix before sleep I swear.

Modified Paths:
--------------
    branches/etch-a-ton/source/blender/src/editarmature_sketch.c

Modified: branches/etch-a-ton/source/blender/src/editarmature_sketch.c
===================================================================
--- branches/etch-a-ton/source/blender/src/editarmature_sketch.c        
2008-11-14 03:21:06 UTC (rev 17451)
+++ branches/etch-a-ton/source/blender/src/editarmature_sketch.c        
2008-11-14 03:52:04 UTC (rev 17452)
@@ -1688,13 +1688,16 @@
        while (index != -1)
        {
                setBoneRollFromPoint(parent, &stk->points[index], invmat, tmat);
-               Mat4MulVecfl(invmat, parent->head); /* going to next bone, fix 
previous head */
 
                child = addEditBone("Bone", &G.edbo, arm);
                VECCOPY(child->head, parent->tail);
                child->parent = parent;
                child->flag |= BONE_CONNECTED;
                
+               /* going to next bone, fix parent */
+               Mat4MulVecfl(invmat, parent->tail);
+               Mat4MulVecfl(invmat, parent->head);
+
                parent = child; // new child is next parent
                bone_start = index; // start next bone from current index
 
@@ -1705,8 +1708,9 @@
 
        setBoneRollFromPoint(parent, &stk->points[end], invmat, tmat);
 
+       /* fix last bone */
+       Mat4MulVecfl(invmat, parent->tail);
        Mat4MulVecfl(invmat, parent->head);
-       Mat4MulVecfl(invmat, parent->tail);
        lastBone = parent;
        
        return lastBone;


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to