[Bf-blender-cvs] [8061f2a4d1b] greasepencil-refactor: GPencil: Reduce Fill opacity while drawing
Antonio Vazquez
noreply at git.blender.org
Mon Jan 20 15:47:28 CET 2020
Commit: 8061f2a4d1ba2724feb107a48c5991bb071bb46e
Author: Antonio Vazquez
Date: Mon Jan 20 15:47:12 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB8061f2a4d1ba2724feb107a48c5991bb071bb46e
GPencil: Reduce Fill opacity while drawing
This is used when fill strokes to be able to see the lines below and make a more precise filling. This opacity will be reset in the final fill and it's only while drawing.
===================================================================
M source/blender/draw/intern/draw_cache_impl_gpencil.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c
index 0d5983238dd..0cf03d9951c 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.c
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c
@@ -494,7 +494,9 @@ 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;
+ /* Reduce slightly the opacity of fill to make easy fill areas while drawing. */
+ gps->fill_opacity_fac = 0.8f;
+
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. */
More information about the Bf-blender-cvs
mailing list