diff options
author | Joshua Leung <aligorith@gmail.com> | 2017-01-18 16:24:41 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2017-01-18 17:06:42 +0300 |
commit | a93881d70433853c2f77a13bb176a9758316811b (patch) | |
tree | 7a6d778562cb483de987f80efe768673beccbda3 /source/blender/editors/gpencil/gpencil_paint.c | |
parent | 259447300f67e66169211950137b862e8a018d0e (diff) |
GPencil: Pressing 'B' while in 'Continuous Drawing' mode will create a blank frame
This is a hardcoded keymapping that just calls the "Add Blank Frame" operator
introduced in the previous commit.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index c23bfb1ff60..c2228a932fe 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2432,6 +2432,14 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) /* enable continuous if release D key in mid drawing */ p->scene->toolsettings->gpencil_flags |= GP_TOOL_FLAG_PAINTSESSIONS_ON; } + else if ((event->type == BKEY) && (event->val == KM_RELEASE)) { + /* Add Blank Frame + * - Since this operator is non-modal, we can just call it here, and keep going... + * - This operator is especially useful when animating + */ + WM_operator_name_call(C, "GPENCIL_OT_blank_frame_add", WM_OP_EXEC_DEFAULT, NULL); + estate = OPERATOR_RUNNING_MODAL; + } else { estate = OPERATOR_RUNNING_MODAL; } |