[Bf-blender-cvs] [87d2586c9d8] greasepencil-object: Fix Fill over filled colors

Antonio Vazquez noreply at git.blender.org
Mon Jan 8 16:43:17 CET 2018


Commit: 87d2586c9d895ed6a253bb4eac9f6b6f53535704
Author: Antonio Vazquez
Date:   Mon Jan 8 16:43:08 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB87d2586c9d895ed6a253bb4eac9f6b6f53535704

Fix Fill over filled colors

The fill offscreen render never must use the fill to avoid false filled areas.

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

M	source/blender/editors/gpencil/drawgpencil.c
M	source/blender/editors/gpencil/gpencil_fill.c
M	source/blender/editors/include/ED_gpencil.h

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

diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index b031e45b8a9..9c2525c68ab 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1053,7 +1053,7 @@ static void gp_draw_strokes(tGPDdraw *tgpw)
 
 			/* 3D Fill */
 			//if ((dflag & GP_DRAWDATA_FILL) && (gps->totpoints >= 3)) {
-			if (gps->totpoints >= 3) {
+			if ((gps->totpoints >= 3) && (tgpw->disable_fill != 1)) {
 				/* set color using palette, tint color and opacity */
 				interp_v3_v3v3(tfill, palcolor->fill, tgpw->tintcolor, tgpw->tintcolor[3]);
 				tfill[3] = palcolor->fill[3] * tgpw->opacity;
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 9b86197e8d9..9573c58814c 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -147,6 +147,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, float ink[4])
 	tgpw.winx = tgpf->ar->winx;
 	tgpw.winy = tgpf->ar->winy;
 	tgpw.dflag = 0;
+	tgpw.disable_fill = 1;
 	tgpw.dflag |= (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_NOSTATUS);
 
 	glEnable(GL_BLEND);
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index eebe7e7ef85..f89603bff41 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -77,6 +77,7 @@ typedef struct tGPDdraw {
 	struct bGPDframe *gpf;              /* frame */
 	struct bGPDframe *t_gpf;            /* temporal frame */
 	struct bGPDstroke *gps;             /* stroke */
+	int disable_fill;                   /* disable fill */
 	int offsx;                          /* windows offset x */
 	int offsy;                          /* windows offset y */
 	int winx;                           /* windows width */



More information about the Bf-blender-cvs mailing list