diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-24 09:54:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-24 09:56:40 +0300 |
commit | 1afdea624c963b46099d1a5db8d0ebcc48f675c5 (patch) | |
tree | ee7f38e3d787a258256bfbfbb6f3703399d5c75c /source/blender/editors/transform/transform_input.c | |
parent | 9be3ef6c7257dfcb7b1477cd451a0a4b7a5921db (diff) |
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.
Diffstat (limited to 'source/blender/editors/transform/transform_input.c')
-rw-r--r-- | source/blender/editors/transform/transform_input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 2821277ffa0..e0c62c45204 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -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), |