Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-06-03 20:02:02 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-06-03 20:05:33 +0400
commitc918f24edb5df8cc837b77363c4d928f8bfa9159 (patch)
treed33eb51fdf371160930e69e50b5aec4bf090ad4b /source/blender/editors/transform/transform_input.c
parentf46b384fc5e66949c0c2ce974d2842dd76ee6be8 (diff)
Tweaks to bevel and crease transform
They were using INPUT_SPRING in a way which didn't allow it to easily redo the operator because INPUT_SPRING internally is stored as a ration between old value and new one and crease and bevel were converting this to value delta. Now made it special input type INPUT_SPRING_DELTA which is storing delta of the spring, meaning now values in the redo panel kind of makes sense -- they mean how much to add/remove to the crease/bevel weight. Expect to be no functional changes from interactive transform POV, just a bit more convenient to use redo panel.
Diffstat (limited to 'source/blender/editors/transform/transform_input.c')
-rw-r--r--source/blender/editors/transform/transform_input.c11
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;