Transform: redo resize now constrains axis values

Before 1bfbfa2810 this wasn't essential because the constraints
prevented the axes from being applied.

Now redo ignores constraints - the input values must be constrained.
This commit is contained in:
Campbell Barton 2019-02-22 08:42:08 +11:00
parent 4d4ae491c8
commit d00f54e574
Notes: blender-bot 2023-02-14 07:36:17 +01:00
Referenced by issue #63570, Proportional editing resets scaling along Y and Z axis  on mouse wheel
1 changed files with 10 additions and 3 deletions

View File

@ -3824,9 +3824,15 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
}
size_to_mat3(mat, t->values);
if (t->con.applySize) {
if (t->con.mode & CON_APPLY) {
t->con.applySize(t, NULL, NULL, mat);
/* Only so we have re-usable value with redo. */
for (i = 0; i < 3; i++) {
if (!(t->con.mode & (CON_AXIS0 << i))) {
t->values[i] = 1.0f;
}
}
}
copy_m3_m3(t->mat, mat); // used in gizmo
@ -3850,8 +3856,9 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
if (t->flag & T_CLIP_UV && clipUVTransform(t, t->values, 1)) {
size_to_mat3(mat, t->values);
if (t->con.applySize)
if (t->con.mode & CON_APPLY) {
t->con.applySize(t, NULL, NULL, mat);
}
FOREACH_TRANS_DATA_CONTAINER (t, tc) {