diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-03 16:15:04 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-03 16:20:17 +0400 |
commit | 0102d57c1de344fc3dd14e93d0593ed616d29d7b (patch) | |
tree | d56c86749dc7b7d99b6a62094f5f14b19b6d481c /source/blender/editors/mask/mask_edit.c | |
parent | 0ebade55fcef5acb9b5e34dbc7cc5ab2a4a3d964 (diff) |
Slide mask spline segment to define it's curvature
This actually implements the idea used in Gimp which is grabbing
an arbitrary point on the spline and dragging it, ensuring spline
goes over this point. This is really useful way to tweak spline
curvature.
Currently only affects on a closest handle, meaning no weighting
on changes for both handles which are adjacent to the same segment
will happen just yet,
Another limitation is that currently such a slide is a big jumpy
when you start sliding. This is because projection is not used
to calculate u value because projection used to fail a lot for
me here and didn't find a nice solution for this yet. But this is
to be improved for sure!
Diffstat (limited to 'source/blender/editors/mask/mask_edit.c')
-rw-r--r-- | source/blender/editors/mask/mask_edit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index e27f36e5a4c..d94a1906a84 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -438,6 +438,7 @@ void ED_operatortypes_mask(void) /* shape */ WM_operatortype_append(MASK_OT_slide_point); + WM_operatortype_append(MASK_OT_slide_spline_curvature); WM_operatortype_append(MASK_OT_cyclic_toggle); WM_operatortype_append(MASK_OT_handle_type_set); @@ -534,6 +535,7 @@ void ED_keymap_mask(wmKeyConfig *keyconf) /* shape */ WM_keymap_add_item(keymap, "MASK_OT_cyclic_toggle", CKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MASK_OT_slide_point", ACTIONMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MASK_OT_slide_spline_curvature", ACTIONMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MASK_OT_handle_type_set", VKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MASK_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0); // WM_keymap_add_item(keymap, "MASK_OT_feather_weight_clear", SKEY, KM_PRESS, KM_ALT, 0); |