Fix T79112: Redo shrink/fatten uses negative values

The numbers in the redo panel were negated compared to the value
entered while transforming.
This commit is contained in:
Campbell Barton 2020-07-21 21:34:08 +10:00
parent 6778ef4dcc
commit bafe22e8ce
Notes: blender-bot 2023-02-14 05:44:22 +01:00
Referenced by issue #79112, Negative value on the Redo panel for Extrude Along Normal and Extrude individuals.
2 changed files with 6 additions and 6 deletions

View File

@ -124,8 +124,8 @@ static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const double mval[2
{
const int winy = t->region ? t->region->winy : 1;
/* Flip so dragging up increases (matching viewport zoom). */
output[0] = ((mval[1] - mi->imval[1]) / winy) * -2.0f;
/* Dragging up increases (matching viewport zoom). */
output[0] = ((mval[1] - mi->imval[1]) / winy) * 2.0f;
}
/** Callback for #INPUT_VERTICAL_ABSOLUTE */
@ -139,8 +139,8 @@ static void InputVerticalAbsolute(TransInfo *t,
InputVector(t, mi, mval, vec);
project_v3_v3v3(vec, vec, t->viewinv[1]);
/* Flip so dragging up increases (matching viewport zoom). */
output[0] = dot_v3v3(t->viewinv[1], vec) * -2.0f;
/* Dragging up increases (matching viewport zoom). */
output[0] = dot_v3v3(t->viewinv[1], vec) * 2.0f;
}
/** Callback for #INPUT_CUSTOM_RATIO_FLIP */

View File

@ -54,13 +54,13 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
char str[UI_MAX_DRAW_STR];
size_t ofs = 0;
distance = -t->values[0];
distance = t->values[0];
snapGridIncrement(t, &distance);
applyNumInput(&t->num, &distance);
t->values_final[0] = -distance;
t->values_final[0] = distance;
/* header print for NumInput */
ofs += BLI_strncpy_rlen(str + ofs, TIP_("Shrink/Fatten:"), sizeof(str) - ofs);