Revision: 17445
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17445
Author:   theeth
Date:     2008-11-13 22:44:32 +0100 (Thu, 13 Nov 2008)

Log Message:
-----------
Normal Orientation on EditBones uses roll for Z axis.

Modified Paths:
--------------
    trunk/blender/source/blender/src/transform_orientations.c

Modified: trunk/blender/source/blender/src/transform_orientations.c
===================================================================
--- trunk/blender/source/blender/src/transform_orientations.c   2008-11-13 
18:57:10 UTC (rev 17444)
+++ trunk/blender/source/blender/src/transform_orientations.c   2008-11-13 
21:44:32 UTC (rev 17445)
@@ -40,6 +40,7 @@
 
 #include "BKE_global.h"
 #include "BKE_utildefines.h"
+#include "BKE_armature.h"
 
 #include "BLI_arithb.h"
 #include "BLI_blenlib.h"
@@ -680,21 +681,20 @@
                                {
                                        if (ebone->flag & BONE_SELECTED)
                                        {
+                                               float mat[3][3];
                                                float vec[3];
                                                VecSubf(vec, ebone->tail, 
ebone->head);
                                                Normalize(vec);
                                                VecAddf(normal, normal, vec);
+                                               
+                                               vec_roll_to_mat3(vec, 
ebone->roll, mat);
+                                               VecAddf(plane, plane, mat[2]);
                                        }
                                }
                        }
                        
                        Normalize(normal);
-                       Crossf(plane, G.obedit->obmat[0], normal);
-                       
-                       if (Inpf(plane, plane) < FLT_EPSILON)
-                       {
-                               Crossf(plane, G.obedit->obmat[1], normal);
-                       } 
+                       Normalize(plane);
 
                        if (plane[0] != 0 || plane[1] != 0 || plane[2] != 0)
                        {


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

Reply via email to