From 4cf069a41d0a3c39a39237656cd7e65be1d37924 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 26 May 2013 18:24:13 +0000 Subject: 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. --- source/blender/editors/space_view3d/view3d_edit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source') diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 63d533fb494..4154318e979 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3196,9 +3196,14 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar, 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); -- cgit v1.2.3