[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17050] branches/etch-a-ton/source/blender /src/editarmature_sketch.c: Multiply by armature inverse matrix to make sure converted bones are where they should be .
Martin Poirier
theeth at yahoo.com
Sun Oct 12 19:54:47 CEST 2008
Revision: 17050
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17050
Author: theeth
Date: 2008-10-12 19:54:47 +0200 (Sun, 12 Oct 2008)
Log Message:
-----------
Multiply by armature inverse matrix to make sure converted bones are where they should be.
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-10-12 17:33:03 UTC (rev 17049)
+++ branches/etch-a-ton/source/blender/src/editarmature_sketch.c 2008-10-12 17:54:47 UTC (rev 17050)
@@ -890,10 +890,13 @@
bArmature *arm= G.obedit->data;
SK_Point *head;
EditBone *parent = NULL;
+ float invmat[4][4]; /* move in caller function */
int i;
head = NULL;
+ Mat4Invert(invmat, G.obedit->obmat);
+
for (i = 0; i < stk->nb_points; i++)
{
SK_Point *pt = stk->points + i;
@@ -913,6 +916,9 @@
VECCOPY(bone->head, head->p);
VECCOPY(bone->tail, pt->p);
+ Mat4MulVecfl(invmat, bone->head);
+ Mat4MulVecfl(invmat, bone->tail);
+
if (parent != NULL)
{
bone->parent = parent;
More information about the Bf-blender-cvs
mailing list