Transform: reverse absolute, ratio vertical motion
This only impacts push-pull & shrink-fatten. Flipping this matches zoom where moving the mouse cursor up increases the zoom-level. Previous behavior felt unnatural when adding gizmos to these tools.
This commit is contained in:
parent
9be3ef6c72
commit
1afdea624c
Notes:
blender-bot
2023-02-14 10:11:54 +01:00
Referenced by issue #71974, Extrude Along Normals - Shrink/Fatten mouse direction got inverted
|
@ -115,7 +115,8 @@ static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const double mval[2
|
|||
{
|
||||
const int winy = t->ar ? t->ar->winy : 1;
|
||||
|
||||
output[0] = ((mval[1] - mi->imval[1]) / winy) * 2.0f;
|
||||
/* Flip so dragging up increases (matching viewport zoom). */
|
||||
output[0] = ((mval[1] - mi->imval[1]) / winy) * -2.0f;
|
||||
}
|
||||
|
||||
static void InputVerticalAbsolute(TransInfo *t,
|
||||
|
@ -128,7 +129,8 @@ static void InputVerticalAbsolute(TransInfo *t,
|
|||
InputVector(t, mi, mval, vec);
|
||||
project_v3_v3v3(vec, vec, t->viewinv[1]);
|
||||
|
||||
output[0] = dot_v3v3(t->viewinv[1], vec) * 2.0f;
|
||||
/* Flip so dragging up increases (matching viewport zoom). */
|
||||
output[0] = dot_v3v3(t->viewinv[1], vec) * -2.0f;
|
||||
}
|
||||
|
||||
void setCustomPoints(TransInfo *UNUSED(t),
|
||||
|
|
Loading…
Reference in New Issue