[Bf-blender-cvs] [adb8104c7df] greasepencil-object: Finish polyline session releasing Shift

Antonio Vazquez noreply at git.blender.org
Sun Jul 9 11:41:51 CEST 2017


Commit: adb8104c7df0d565a2fe9bea6b853c36fa5a30bb
Author: Antonio Vazquez
Date:   Sun Jul 9 11:41:37 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBadb8104c7df0d565a2fe9bea6b853c36fa5a30bb

Finish polyline session releasing Shift

For artist is better cancel polyline drawing session releasing the shift key instead to press Esc or Enter.

Now, to draw polylines keep shift pressed and finish releasing this key.

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

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 b2c6d7a1c29..549f8715069 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1992,12 +1992,11 @@ static void gpencil_draw_status_indicators(tGPsdata *p)
 					                                  "ESC/Enter to end  (or click outside this area)"));
 					break;
 				case GP_PAINTMODE_DRAW:
-					ED_area_headerprint(p->sa, IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw | "
-					                                  "E/ESC/Enter to end  (or click outside this area)"));
+					ED_area_headerprint(p->sa, IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw"));
 					break;
 				case GP_PAINTMODE_DRAW_POLY:
 					ED_area_headerprint(p->sa, IFACE_("Grease Pencil Poly Session: LMB click to place next stroke vertex | "
-					                                  "ESC/Enter to end  (or click outside this area)"));
+					                                  "Release Shift/ESC/Enter to end  (or click outside this area)"));
 					break;
 				
 				default: /* unhandled future cases */
@@ -2475,7 +2474,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 	/* exit painting mode (and/or end current stroke)
 	 * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) as that would break polyline [#32647]
 	 */
-	if (ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) {
+	/* if polyline and release shift must cancel */
+	if ((ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) || 
+		((p->paintmode == GP_PAINTMODE_DRAW_POLY) && (event->shift == 0))) {
 		/* exit() ends the current stroke before cleaning up */
 		/* printf("\t\tGP - end of paint op + end of stroke\n"); */
 		/* if drawing polygon and enable on back, must move stroke */




More information about the Bf-blender-cvs mailing list