[Bf-blender-cvs] [cfc2fa33bfc] master: Fix transform scale header printing

Campbell Barton noreply at git.blender.org
Mon Feb 25 17:21:28 CET 2019


Commit: cfc2fa33bfcd1517731a266b9169b3d6a5b80ced
Author: Campbell Barton
Date:   Tue Feb 26 03:18:07 2019 +1100
Branches: master
https://developer.blender.org/rBcfc2fa33bfcd1517731a266b9169b3d6a5b80ced

Fix transform scale header printing

Clearing constrained axes caused the scale not to print correctly.

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

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

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

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e4967e172eb..487adf29ad8 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -3828,16 +3828,24 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
 		t->con.applySize(t, NULL, NULL, mat);
 
 		/* Only so we have re-usable value with redo. */
+		float pvec[3] = {0.0f, 0.0f, 0.0f};
+		int j = 0;
 		for (i = 0; i < 3; i++) {
 			if (!(t->con.mode & (CON_AXIS0 << i))) {
 				t->values[i] = 1.0f;
 			}
+			else {
+				pvec[j++] = t->values[i];
+			}
 		}
+		headerResize(t, pvec, str);
+	}
+	else {
+		headerResize(t, t->values, str);
 	}
 
 	copy_m3_m3(t->mat, mat);    // used in gizmo
 
-	headerResize(t, t->values, str);
 
 	FOREACH_TRANS_DATA_CONTAINER (t, tc) {
 		TransData *td = tc->data;



More information about the Bf-blender-cvs mailing list