[Bf-blender-cvs] [86c3fbf0db9] greasepencil-object: Add alpha factor to mask while filling

Antonio Vazquez noreply at git.blender.org
Mon Dec 18 17:50:32 CET 2017


Commit: 86c3fbf0db93d0ace08728841d7db46967b5db25
Author: Antonio Vazquez
Date:   Mon Dec 18 17:50:21 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rB86c3fbf0db93d0ace08728841d7db46967b5db25

Add alpha factor to mask while filling

If the color fill opacity is equal to 1.0, it's very hard to see the strokes that you want to fill. With this change, always the stroke is visible while painting.

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

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 376ff234774..8e6367a2544 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1381,6 +1381,11 @@ static void gp_init_palette(tGPsdata *p)
 		/* set palette colors */
 		copy_v4_v4(gpd->scolor, palcolor->rgb);
 		copy_v4_v4(gpd->sfill, palcolor->fill);
+		/* add some alpha to make easy the filling without hide strokes */
+		if (gpd->sfill[3] > 0.8f) {
+			gpd->sfill[3] = 0.8f;
+		}
+
 		gpd->sflag = palcolor->flag;
 		gpd->bstroke_style = palcolor->stroke_style;
 		gpd->bfill_style = palcolor->fill_style;



More information about the Bf-blender-cvs mailing list