Fix transform scale header printing
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Feb 2019 16:18:07 +0000 (03:18 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Feb 2019 16:20:40 +0000 (03:20 +1100)
Clearing constrained axes caused the scale not to print correctly.

source/blender/editors/transform/transform.c

index e4967e172eb73bb2ec16a846b3dc5c857c575ba2..487adf29ad8bd0f981b6088cfe68dc26150625e7 100644 (file)
@@ -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;