[Bf-blender-cvs] [ef0de17] GPencil_EditStrokes: Bugfix: Undo during "continous drawing" (or "sketching sessions") for GPencil was broken

Joshua Leung noreply at git.blender.org
Sat Nov 29 12:13:53 CET 2014


Commit: ef0de17caa03cf4f917956a4adf184cd3b592c54
Author: Joshua Leung
Date:   Sun Nov 30 00:13:24 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rBef0de17caa03cf4f917956a4adf184cd3b592c54

Bugfix: Undo during "continous drawing" (or "sketching sessions") for GPencil was broken

While the hotkey here is now hardcoded, it is possible to undo the last
stroke when drawing with the "continous drawing" option enabled. This
seems to have been broken at some stage due to a fix the old node-editor
bug where holding the dkey was accidentally inserting drivers all over
the show.

This bug seems to have been around since 2.69 (at least!), and doesn't seem
to have been noticed until now!

===================================================================

M	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 73c09b5..692523f 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1832,8 +1832,11 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 
 	/* we don't pass on key events, GP is used with key-modifiers - prevents Dkey to insert drivers */
 	if (ISKEYBOARD(event->type)) {
-		if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY)) {
-			/* allow some keys - for frame changing: [#33412] */
+		if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY, ZKEY)) {
+			/* allow some keys:
+			 *   - for frame changing [#33412]
+			 *   - for undo (during sketching sessions)
+			 */
 		}
 		else {
 			estate = OPERATOR_RUNNING_MODAL;




More information about the Bf-blender-cvs mailing list