Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-05-26 22:24:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-26 22:24:13 +0400
commit4cf069a41d0a3c39a39237656cd7e65be1d37924 (patch)
tree981f0201d06b6175d11b0f4180e922ff6a2e1f3a
parentadd5167b8d488a89712730926cbfbf8ec01a862f (diff)
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.
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c5
1 files changed, 5 insertions, 0 deletions
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);