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>2021-05-12 05:40:06 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-05-20 17:05:44 +0300
commitee5bfde9e6eda215499f5586a502444ff3945bfa (patch)
treee923b1117bc37cadba02ad7e1e6e2f164f441b45 /source/blender/editors/transform/transform.c
parent47f4f3c932b251268f2fcd56a924d5f005bcb8cd (diff)
Fix T87947: Trasnform: Keyboard input uses view orientation
When activated in modal, `translate`, `resize`, `rotate`, `shear` and `edge_rotate_normal` use a different orientation than the set in scene. This orientation needed to match since some of these modes can be switched during operation. The default orientation for these modes was `V3D_ORIENT_VIEW`. And this changed when finishing the `translate` and `resize` to `V3D_ORIENT_GLOBAL`. But this could cause inconsistencies when inputting values from the keyboard. The solution now is to change the orientation when you change the mode. --- Note: Although the user can expect the value entered to reflect the orientation set in the scene, it would require a lot of changes and would not be really useful.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r--source/blender/editors/transform/transform.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 8546ec88715..6ef2eaf67d6 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1412,25 +1412,6 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
ToolSettings *ts = CTX_data_tool_settings(C);
PropertyRNA *prop;
- if (!(t->con.mode & CON_APPLY) && (t->flag & T_MODAL) &&
- ELEM(t->mode, TFM_TRANSLATION, TFM_RESIZE)) {
- /* When redoing these modes the first time, it's more convenient to save
- * in the Global orientation. */
- if (t->mode == TFM_TRANSLATION) {
- mul_m3_v3(t->spacemtx, t->values_final);
- }
- else {
- float tmat[3][3], sizemat[3][3];
- size_to_mat3(sizemat, t->values_final);
- mul_m3_m3m3(tmat, t->spacemtx, sizemat);
- mat3_to_size(t->values_final, tmat);
- }
-
- BLI_assert(t->orient_curr == O_DEFAULT);
- unit_m3(t->spacemtx);
- t->orient[0].type = V3D_ORIENT_GLOBAL;
- }
-
/* Save back mode in case we're in the generic operator */
if ((prop = RNA_struct_find_property(op->ptr, "mode"))) {
RNA_property_enum_set(op->ptr, prop, t->mode);