diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-26 16:45:28 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-26 16:49:00 +0300 |
commit | 12a83db83c5e23f5d0dccd420fa875a736a7b10f (patch) | |
tree | 2775880b1622da08b6482f15ec71c6e93bbecb68 /source/blender/editors/transform/transform_generics.c | |
parent | f86331a0338dc2351e914b45ccbd743b6cccbb19 (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/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index c911331404f..84a685c2e72 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -493,25 +493,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)); |