[Bf-blender-cvs] [9cccf87cbb7] greasepencil-refactor: GPencil: Fix Fill missing while drawing and new draw strokes
Antonio Vazquez
noreply at git.blender.org
Mon Jan 20 10:33:40 CET 2020
Commit: 9cccf87cbb79a9f987a7376d26cdbf3e37fab546
Author: Antonio Vazquez
Date: Mon Jan 20 10:33:21 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB9cccf87cbb79a9f987a7376d26cdbf3e37fab546
GPencil: Fix Fill missing while drawing and new draw strokes
===================================================================
M source/blender/draw/intern/draw_cache_impl_gpencil.c
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c
index 312bb2cd9b6..5e0572905e4 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.c
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c
@@ -494,6 +494,7 @@ bGPDstroke *DRW_cache_gpencil_sbuffer_stroke_data_get(Object *ob)
gps->mat_nr = max_ii(0, gpd->runtime.matid - 1);
gps->flag = gpd->runtime.sbuffer_sflag;
gps->thickness = gpd->runtime.brush_size;
+ gps->fill_opacity_fac = 1.0f;
gps->tot_triangles = max_ii(0, gpd->runtime.sbuffer_used - 2);
gps->caps[0] = gps->caps[1] = GP_STROKE_CAP_ROUND;
gps->runtime.stroke_start = 1; /* Add one for the adjacency index. */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index c377ae1fcff..bf3a3e9d39f 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -906,6 +906,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
/* copy appropriate settings for stroke */
gps->totpoints = totelem;
gps->thickness = brush->size;
+ gps->fill_opacity_fac = 1.0f;
gps->gradient_f = brush->gpencil_settings->gradient_f;
copy_v2_v2(gps->gradient_s, brush->gpencil_settings->gradient_s);
gps->flag = gpd->runtime.sbuffer_sflag;
More information about the Bf-blender-cvs
mailing list