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:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-11-18 15:33:54 +0300
committerJeroen Bakker <jeroen@blender.org>2021-01-13 16:50:40 +0300
commitd0426a4ed50862e012e4314e74f50354fed093c2 (patch)
tree21dce700e53e0c25d8f1197d6bd934d17c071b01
parent3724e4c6f9f30cc2c27bdb988bb3f2d57a4c48c6 (diff)
Fix T82777: Some transform modes using incorrect default orientation
Some modes were always using `"Global"` orientation as the default.
-rw-r--r--source/blender/editors/transform/transform_generics.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 60848eb5678..f835d93bf96 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -506,7 +506,6 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
short orient_types[3];
float custom_matrix[3][3];
- short orient_type_default = V3D_ORIENT_GLOBAL;
short orient_type_scene = V3D_ORIENT_GLOBAL;
short orient_type_set = V3D_ORIENT_GLOBAL;
short orient_type_matrix_set = -1;
@@ -520,6 +519,8 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
}
+ short orient_type_default = orient_type_scene;
+
if (op && (prop = RNA_struct_find_property(op->ptr, "orient_axis_ortho"))) {
t->orient_axis_ortho = RNA_property_enum_get(op->ptr, prop);
}
@@ -535,7 +536,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
orient_type_default = orient_type_set;
}
else if (t->con.mode & CON_APPLY) {
- orient_type_set = orient_type_default = orient_type_scene;
+ orient_type_set = orient_type_scene;
}
else {
if (orient_type_set == orient_type_scene) {