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
path: root/source
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-11-26 16:45:28 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-28 18:47:13 +0300
commit5e2dc507e7e6d5ae2332091cf82661a2bbd8440a (patch)
tree8e5eb6f756dde9b830c61e28aa2ec7e3b07ffb0b /source
parentf3ba6ac1820f53aa04ba2d8601c5a2a2204d8287 (diff)
Fix T93290: Rotation without contraint after extrude has wrong axis
The default orientation of the mode was being indicated as overridden, although the one of constraint was used.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/transform/transform.h2
-rw-r--r--source/blender/editors/transform/transform_generics.c30
-rw-r--r--source/blender/editors/transform/transform_mode.c2
3 files changed, 20 insertions, 14 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index e26617615ae..bc82208bf92 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -598,7 +598,7 @@ typedef struct TransInfo {
* mouse button then.) */
bool is_launch_event_tweak;
- bool is_orient_set;
+ bool is_orient_default_overwrite;
struct {
short type;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index ed95ff9d65b..40fc18c3a89 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -451,25 +451,31 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
}
+ orient_type_default = orient_type_scene;
+
if (orient_type_set != -1) {
- orient_type_default = orient_type_set;
- t->is_orient_set = true;
+ if (!(t->con.mode & CON_APPLY)) {
+ /* Only overwrite default if not constrained. */
+ orient_type_default = orient_type_set;
+ t->is_orient_default_overwrite = true;
+ }
}
else if (orient_type_matrix_set != -1) {
- orient_type_default = orient_type_set = orient_type_matrix_set;
- t->is_orient_set = true;
+ orient_type_set = orient_type_matrix_set;
+ if (!(t->con.mode & CON_APPLY)) {
+ /* Only overwrite default if not constrained. */
+ orient_type_default = orient_type_set;
+ t->is_orient_default_overwrite = true;
+ }
}
else if (t->con.mode & CON_APPLY) {
- orient_type_default = orient_type_set = orient_type_scene;
+ orient_type_set = orient_type_scene;
+ }
+ else if (orient_type_scene == V3D_ORIENT_GLOBAL) {
+ orient_type_set = V3D_ORIENT_LOCAL;
}
else {
- orient_type_default = orient_type_scene;
- if (orient_type_scene == V3D_ORIENT_GLOBAL) {
- orient_type_set = V3D_ORIENT_LOCAL;
- }
- else {
- orient_type_set = V3D_ORIENT_GLOBAL;
- }
+ orient_type_set = V3D_ORIENT_GLOBAL;
}
BLI_assert(!ELEM(-1, orient_type_default, orient_type_set));
diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c
index 05a01dfe3f3..5e2a3890d29 100644
--- a/source/blender/editors/transform/transform_mode.c
+++ b/source/blender/editors/transform/transform_mode.c
@@ -1285,7 +1285,7 @@ void transform_mode_default_modal_orientation_set(TransInfo *t, int type)
/* Currently only these types are supported. */
BLI_assert(ELEM(type, V3D_ORIENT_GLOBAL, V3D_ORIENT_VIEW));
- if (t->is_orient_set) {
+ if (t->is_orient_default_overwrite) {
return;
}