diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-02 07:15:33 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-02 07:15:33 +0300 |
commit | 81dc76c19cff51c9c1d13ab47cbfc9a855fc3263 (patch) | |
tree | 97696483c18cce21d549e0d581270bf6d037f358 /source/blender/editors/transform/transform_constraints.c | |
parent | 14b2c41216e86a95572aa0c607fd8807da59baea (diff) |
Fix T63570: Proportional editing resets scaling along Y and Z axis on mouse wheel
`applyResize(...)` considers that `t->values` always represents a `ratio`.
But this is only `true` with the `MOUSEMOVE` event.
The solution proposed is to never change `t->values`.
The result of the final transformation is now written to `t->values_final`.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D5212
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 3a204d0d157..f78f5c5e623 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -57,7 +57,7 @@ static void drawObjectConstraint(TransInfo *t); /* ************************** CONSTRAINTS ************************* */ -static void constraintAutoValues(TransInfo *t, float vec[3]) +static void constraintValuesFinal(TransInfo *t, float vec[3]) { int mode = t->con.mode; if (mode & CON_APPLY) { @@ -147,10 +147,10 @@ static void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3]) removeAspectRatio(t, vec); } - /* autovalues is operator param, use that directly but not if snapping is forced */ - if (t->flag & T_AUTOVALUES && (t->tsnap.status & SNAP_FORCED) == 0) { - copy_v3_v3(vec, t->auto_values); - constraintAutoValues(t, vec); + /* If `t->values` is operator param, use that directly but not if snapping is forced */ + if (t->flag & T_INPUT_IS_VALUES_FINAL && (t->tsnap.status & SNAP_FORCED) == 0) { + copy_v3_v3(vec, t->values); + constraintValuesFinal(t, vec); /* inverse transformation at the end */ } |