diff options
Diffstat (limited to 'source/blender/editors/transform/transform_input.c')
-rw-r--r-- | source/blender/editors/transform/transform_input.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 70b565859f3..6546a05aedd 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -94,6 +94,12 @@ static void InputSpringFlip(TransInfo *t, MouseInput *mi, const int mval[2], flo } } +static void InputSpringDelta(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) +{ + InputSpring(t, mi, mval, output); + output[0] -= 1.0f; +} + static void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2], float output[3]) { @@ -333,6 +339,11 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode) mi->apply = InputSpringFlip; t->helpline = HLP_SPRING; break; + case INPUT_SPRING_DELTA: + calcSpringFactor(mi); + mi->apply = InputSpringDelta; + t->helpline = HLP_SPRING; + break; case INPUT_ANGLE: mi->data = MEM_callocN(sizeof(double), "angle accumulator"); mi->apply = InputAngle; |