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.
This commit is contained in:
Joshua Leung 2017-01-19 02:24:41 +13:00
parent 259447300f
commit a93881d704
1 changed files with 8 additions and 0 deletions

View File

@ -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;
}