Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-01-25 16:34:56 +0300
committerAntonioya <blendergit@gmail.com>2019-01-25 16:34:56 +0300
commit3fb72a5432a722ac036e5b567940ace13e64705d (patch)
tree2b01a8319e9ae075018e071a5199f9cc80cbdb71 /source/blender/editors/gpencil/gpencil_primitive.c
parente198c5a175cf2c44a034d9a42e51027fe89002b8 (diff)
GP: Use Fill color when drawing strokes for no stroke materials
Artists requested to show the stroke while drawing a new stroke using a material with fill color only, because it's very difficult to see the stroke. Now the stroke shows always but using the fill color, not the stroke color because maybe is not set.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index a4954100bae..01e29ee7b69 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -174,7 +174,14 @@ static void gp_init_colors(tGPDprimitive *p)
if (gp_style) {
/* set colors */
- copy_v4_v4(gpd->runtime.scolor, gp_style->stroke_rgba);
+ if (gp_style->flag & GP_STYLE_STROKE_SHOW) {
+ copy_v4_v4(gpd->runtime.scolor, gp_style->stroke_rgba);
+ }
+ else {
+ /* if no stroke, use fill */
+ copy_v4_v4(gpd->runtime.scolor, gp_style->fill_rgba);
+ }
+
copy_v4_v4(gpd->runtime.sfill, gp_style->fill_rgba);
/* add some alpha to make easy the filling without hide strokes */
if (gpd->runtime.sfill[3] > 0.8f) {