diff options
author | Antonioya <blendergit@gmail.com> | 2016-09-07 10:54:50 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2016-09-07 11:02:52 +0300 |
commit | 1263965f83b15e774ab83255030cf25768de5838 (patch) | |
tree | 6a75ad2f6bdfd34515af4c7c6a66bfc993c0ea67 /source/blender/editors/gpencil/gpencil_ops.c | |
parent | 008afa446fd3cc134d508f08003a74ed90ba494f (diff) |
GPencil: New interpolate strokes operators
Two new modal operators to create a grease pencil interpolate drawing
for one frame or a complete sequence between two frames. For drawing
the temporary strokes in the viewport, two drawing handlers have been
added to manage 3D and 2D stuff.
Video: https://youtu.be/qxYwO5sSg5Y
The operator shortcuts are Ctrl+E and Ctrl+Shift+E. During the modal
operator, the interpolation can be adjusted using the mouse (moving
left/right) or the wheel mouse.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_ops.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_ops.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index ae1c5554521..e5d5bdbc831 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -79,7 +79,6 @@ static void ed_keymap_gpencil_general(wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_ERASER); RNA_boolean_set(kmi->ptr, "wait_for_input", false); - /* Tablet Mappings for Drawing ------------------ */ /* For now, only support direct drawing using the eraser, as most users using a tablet * may still want to use that as their primary pointing device! @@ -144,7 +143,10 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path_primary", "user_preferences.edit.grease_pencil_eraser_radius"); - + /* Interpolation */ + WM_keymap_add_item(keymap, "GPENCIL_OT_interpolate", EKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "GPENCIL_OT_interpolate_sequence", EKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); + /* Sculpting ------------------------------------- */ /* Brush-Based Editing: @@ -433,6 +435,10 @@ void ED_operatortypes_gpencil(void) WM_operatortype_append(GPENCIL_OT_brush_select); /* Editing (Time) --------------- */ + + /* Interpolation */ + WM_operatortype_append(GPENCIL_OT_interpolate); + WM_operatortype_append(GPENCIL_OT_interpolate_sequence); } void ED_operatormacros_gpencil(void) |