[Bf-blender-cvs] [bfae2609283] greasepencil-object: Annotations: Don't respect the "on back" option

Joshua Leung noreply at git.blender.org
Thu Jun 28 11:37:57 CEST 2018


Commit: bfae26092830b56e17a2a14f76850a5ab63d41c1
Author: Joshua Leung
Date:   Thu Jun 28 21:27:41 2018 +1200
Branches: greasepencil-object
https://developer.blender.org/rBbfae26092830b56e17a2a14f76850a5ab63d41c1

Annotations: Don't respect the "on back" option

This is too complicated for an annotation tool

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

M	source/blender/editors/gpencil/annotate_paint.c

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

diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index 42744826ddf..859f191984d 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -2158,14 +2158,6 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 	if (ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) {
 		/* 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 */
-		if (ts) {
-			if ((ts->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
-				if (p->flags & GP_PAINTFLAG_STROKEADDED) {
-					gpencil_move_last_stroke_to_back(C);
-				}
-			}
-		}
 		p->status = GP_STATUS_DONE;
 		estate = OPERATOR_FINISHED;
 	}
@@ -2220,14 +2212,6 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 			}
 			else {
 				/* printf("\t\tGP - end of stroke + op\n"); */
-				/* if drawing polygon and enable on back, must move stroke */
-				if (ts) {
-					if ((ts->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
-						if (p->flags & GP_PAINTFLAG_STROKEADDED) {
-							gpencil_move_last_stroke_to_back(C);
-						}
-					}
-				}
 				p->status = GP_STATUS_DONE;
 				estate = OPERATOR_FINISHED;
 			}
@@ -2308,14 +2292,6 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 				 * NOTE: Don't enter this case if an error occurred while finding the
 				 *       region (as above)
 				 */
-				/* if drawing polygon and enable on back, must move stroke */
-				if (ts) {
-					if ((ts->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
-						if (p->flags & GP_PAINTFLAG_STROKEADDED) {
-							gpencil_move_last_stroke_to_back(C);
-						}
-					}
-				}
 				p->status = GP_STATUS_DONE;
 				estate = OPERATOR_FINISHED;
 			}



More information about the Bf-blender-cvs mailing list