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
This commit is contained in:
2019-08-02 01:15:33 -03:00
parent 14b2c41216
commit 81dc76c19c
3 changed files with 110 additions and 98 deletions

View File

@@ -662,10 +662,16 @@ typedef struct TransInfo {
short prop_mode;
/** Value taken as input, either through mouse coordinates or entered as a parameter. */
float values[4];
/** Offset applied ontop of modal input. */
float values_modal_offset[4];
float auto_values[4];
/** Final value of the transformation (displayed in the redo panel).
* If the operator is executed directly (not modal), this value is usually the
* value of the input parameter, except when a constrain is entered. */
float values_final[4];
/* Axis members for modes that use an axis separate from the orientation (rotate & shear). */
@@ -764,7 +770,9 @@ enum {
/** Don't use mirror even if the data-block option is set. */
T_NO_MIRROR = 1 << 19,
T_AUTOVALUES = 1 << 20,
/** To indicate that the value set in the `value` parameter is the final
* value of the transformation, modified only by the constrain. */
T_INPUT_IS_VALUES_FINAL = 1 << 20,
/** To specify if we save back settings at the end. */
T_MODAL = 1 << 21,