[Bf-blender-cvs] [0e75aa44fb9] master: Fix T78304: Scaling without a constraint axis shows wrong parameters in Adjust Last operator panel

Germano Cavalcante noreply at git.blender.org
Fri Jun 26 14:16:34 CEST 2020


Commit: 0e75aa44fb9a5036bc11610c369618fe1fdb327b
Author: Germano Cavalcante
Date:   Fri Jun 26 09:14:01 2020 -0300
Branches: master
https://developer.blender.org/rB0e75aa44fb9a5036bc11610c369618fe1fdb327b

Fix T78304: Scaling without a constraint axis shows wrong parameters in Adjust Last operator panel

Caused by {rB600fd1c6f0ed}

===================================================================

M	source/blender/editors/transform/transform.c

===================================================================

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 00f1d78881f..dce3cb47b10 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1597,11 +1597,19 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
   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
-     * the Global orientation. */
-    mul_m3_v3(t->spacemtx, t->values_final);
-    unit_m3(t->spacemtx);
+     * 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 == 0);
+    unit_m3(t->spacemtx);
     t->orient[0].type = V3D_ORIENT_GLOBAL;
   }



More information about the Bf-blender-cvs mailing list