Revision: 57038
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57038
Author:   campbellbarton
Date:     2013-05-26 18:24:13 +0000 (Sun, 26 May 2013)
Log Message:
-----------
the viewport align-active option was flipping the viewport direction,
now you can add an object, enable align to view, then align the view back to 
the object without flipping.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c     
2013-05-26 17:34:03 UTC (rev 57037)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c     
2013-05-26 18:24:13 UTC (rev 57038)
@@ -3196,9 +3196,14 @@
                        align_active = false;
                }
                else {
+                       const float z_flip_quat[4] = {0.0f, 0.0f, 0.0f, 1.0f};
                        float obact_quat[4];
                        float twmat[3][3];
 
+                       /* flip the input, the end result being that an object
+                        * with no rotation behaves as if 'align_active' is off 
*/
+                       mul_qt_qtqt(new_quat, new_quat, z_flip_quat);
+
                        /* same as transform manipulator when normal is set */
                        ED_getTransformOrientationMatrix(C, twmat, false);
 

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

Reply via email to