From a93881d70433853c2f77a13bb176a9758316811b Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 19 Jan 2017 02:24:41 +1300 Subject: 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. --- source/blender/editors/gpencil/gpencil_paint.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/gpencil/gpencil_paint.c') 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; } -- cgit v1.2.3