From 677c712b58d6a6aefe2dc13389558b5556ad9145 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 4 Dec 2012 17:38:55 +0000 Subject: fix [#33412] Jump to next frame broken in grease pencil mode allow arrow keys while in grease pencil session, otherwise you can't change frames. also correct out-of-date comments. --- source/blender/editors/gpencil/gpencil_paint.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index e04bbc1f2bf..8fdca730674 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1815,10 +1815,16 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, wmEvent *event) * better in tools that immediately apply * in 3D space. */ - + /* we don't pass on key events, GP is used with key-modifiers - prevents Dkey to insert drivers */ - if (ISKEYBOARD(event->type)) - estate = OPERATOR_RUNNING_MODAL; + if (ISKEYBOARD(event->type)) { + if (ELEM4(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY)) { + /* allow some keys - for frame changing: [#33412] */ + } + else { + estate = OPERATOR_RUNNING_MODAL; + } + } //printf("\tGP - handle modal event...\n"); -- cgit v1.2.3