diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-07 21:49:10 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-07 22:51:51 +0300 |
commit | 2f63e479313332756d0879b841527a31fa1d30b3 (patch) | |
tree | 885425296ac7adf80365d25b281fc8d7f270f4f3 /source/blender/editors/transform/transform_generics.c | |
parent | ab122c73ba3504b5bada7f124115a557a7b466ee (diff) |
Fix T76504: Change in behavior of constraints orientation
The Extrude operator, whose orientation is NORMAL, has undergone some seemingly accidental changes:
- In 2.79 if you press the same key as the axis in constraint, it changes from Normal to No Contraint -> Global -> Normal and repeat this.
- In 2.80 it changes from Normal to Local -> No Contraint -> Global -> Local and repeat this.
This committee resumes the behavior of 2.79
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index e4063c055d6..9d94d229b25 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1681,13 +1681,21 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } t->orientation.types[0] = orient_type_default; - t->orientation.types[1] = orient_type_constraint; - t->orientation.types[2] = orient_type_constraint != V3D_ORIENT_GLOBAL ? V3D_ORIENT_GLOBAL : - V3D_ORIENT_LOCAL; t->orientation.custom = custom_orientation; + /* To keep the old behavior logic to init contraint orientarions became this: */ + t->orientation.types[1] = V3D_ORIENT_GLOBAL; + t->orientation.types[2] = orient_type_constraint != V3D_ORIENT_GLOBAL ? + orient_type_constraint : + V3D_ORIENT_LOCAL; + if (t->con.mode & CON_APPLY) { - t->orientation.index = 1; + if (orient_type_constraint == V3D_ORIENT_GLOBAL) { + t->orientation.index = 1; + } + else { + t->orientation.index = 2; + } } } |