[Bf-blender-cvs] [d1067b645db] greasepencil-object: GP: Fill: Fix issue with textured strokes

Charlie Jolly noreply at git.blender.org
Thu Feb 14 12:13:20 CET 2019


Commit: d1067b645dbe03d19b153785acbae2196cb259f2
Author: Charlie Jolly
Date:   Thu Feb 14 11:10:39 2019 +0000
Branches: greasepencil-object
https://developer.blender.org/rBd1067b645dbe03d19b153785acbae2196cb259f2

GP: Fill: Fix issue with textured strokes

Force textured strokes to use control lines for the fill boundary regardless of fill mode.

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

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 04f1045478e..91e2a21aa3e 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -289,10 +289,13 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4])
 			tgpw.onion = true;
 			tgpw.custonion = true;
 
+			bool textured_stroke = (gp_style->stroke_style == GP_STYLE_STROKE_STYLE_TEXTURE);
+
 			/* normal strokes */
-			if ((tgpf->fill_draw_mode == GP_FILL_DMODE_STROKE) ||
+			if (((tgpf->fill_draw_mode == GP_FILL_DMODE_STROKE) ||
 				(tgpf->fill_draw_mode == GP_FILL_DMODE_ADAPTIVE) ||
-			    (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
+			    (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH)) &&
+				!textured_stroke)
 			{
 				ED_gp_draw_fill(&tgpw);
 			}
@@ -300,7 +303,8 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4])
 			/* 3D Lines with basic shapes and invisible lines */
 			if ((tgpf->fill_draw_mode == GP_FILL_DMODE_CONTROL) ||
 			    (tgpf->fill_draw_mode == GP_FILL_DMODE_ADAPTIVE) ||
-			    (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
+			    (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH) ||
+				textured_stroke)
 			{
 				gp_draw_basic_stroke(
 				        tgpf, gps, tgpw.diff_mat, gps->flag & GP_STROKE_CYCLIC, ink,



More information about the Bf-blender-cvs mailing list