[Bf-blender-cvs] [d435719fb4c] greasepencil-object: Do not draw fill control lines in multiwindow

Antonio Vazquez noreply at git.blender.org
Mon Mar 19 09:38:13 CET 2018


Commit: d435719fb4ce992e9f66d6de30341f30676d2720
Author: Antonio Vazquez
Date:   Mon Mar 19 09:38:01 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBd435719fb4ce992e9f66d6de30341f30676d2720

Do not draw fill control lines in multiwindow

If enable the fill control lines, these must be drawn only in the current window.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 7e11c431814..b62f45360eb 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -912,6 +912,12 @@ static void gpencil_draw_boundary_lines(const bContext *UNUSED(C), tGPDfill *tgp
 static void gpencil_fill_draw_3d(const bContext *C, ARegion *UNUSED(ar), void *arg)
 {
 	tGPDfill *tgpf = (tGPDfill *)arg;
+	/* draw only in the region that originated operator. This is required for multiwindow */
+	ARegion *ar = CTX_wm_region(C);
+	if (ar != tgpf->ar) {
+		return;
+	}
+
 	gpencil_draw_boundary_lines(C, tgpf); 
 }



More information about the Bf-blender-cvs mailing list