diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-03 20:02:02 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-03 20:05:33 +0400 |
commit | c918f24edb5df8cc837b77363c4d928f8bfa9159 (patch) | |
tree | d33eb51fdf371160930e69e50b5aec4bf090ad4b /source/blender/editors/transform/transform.c | |
parent | f46b384fc5e66949c0c2ce974d2842dd76ee6be8 (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.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 34e76ce5ece..899f1191e33 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4730,7 +4730,7 @@ static void initBevelWeight(TransInfo *t) t->mode = TFM_BWEIGHT; t->transform = applyBevelWeight; - initMouseInputMode(t, &t->mouse, INPUT_SPRING); + initMouseInputMode(t, &t->mouse, INPUT_SPRING_DELTA); t->idx_max = 0; t->num.idx_max = 0; @@ -4754,7 +4754,6 @@ static void applyBevelWeight(TransInfo *t, const int UNUSED(mval[2])) weight = t->values[0]; - weight -= 1.0f; if (weight > 1.0f) weight = 1.0f; snapGridIncrement(t, &weight); @@ -4809,7 +4808,7 @@ static void initCrease(TransInfo *t) t->mode = TFM_CREASE; t->transform = applyCrease; - initMouseInputMode(t, &t->mouse, INPUT_SPRING); + initMouseInputMode(t, &t->mouse, INPUT_SPRING_DELTA); t->idx_max = 0; t->num.idx_max = 0; @@ -4833,7 +4832,6 @@ static void applyCrease(TransInfo *t, const int UNUSED(mval[2])) crease = t->values[0]; - crease -= 1.0f; if (crease > 1.0f) crease = 1.0f; snapGridIncrement(t, &crease); |