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>2019-02-27 18:30:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-27 18:37:17 +0300
commit03da3b6593a24d24af60ec13ffb218ad06b5fd66 (patch)
treeda930385c3b8bed9ccec2c1042e001590fa4305b /source/blender/editors/transform/transform_orientations.c
parent4cd7dc6860a63d96b484372818c024b2cdd6379b (diff)
Transform: fix redo rotate adjusting orientation
Regression in recent update. Also de-duplicate orientation matrix initialization.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 019ea2c0580..b486976bfad 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -483,6 +483,20 @@ void initTransformOrientation(bContext *C, TransInfo *t)
}
break;
}
+
+ if (t->orient_matrix_is_set == false) {
+ t->orient_matrix_is_set = true;
+ if (t->flag & T_MODAL) {
+ /* Rotate for example defaults to operating on the view plane. */
+ t->orientation.unset = V3D_ORIENT_VIEW;
+ copy_m3_m4(t->orient_matrix, t->viewinv);
+ normalize_m3(t->orient_matrix);
+ }
+ else {
+ copy_m3_m3(t->orient_matrix, t->spacemtx);
+ }
+ negate_m3(t->orient_matrix);
+ }
}
/**