GP: Use Fill color when drawing strokes for no stroke materials
[blender.git] / source / blender / editors / gpencil / gpencil_paint.c
index d9e36f5bf8c1d0b974f51989cd4ca940d12efa89..e1f66758007d533e0c56151cc4a58b9e6614b98e 100644 (file)
@@ -1846,7 +1846,13 @@ static void gp_init_colors(tGPsdata *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) {