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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c14
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c9
3 files changed, 20 insertions, 11 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 0cc835b8d4e..27c640cc77a 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1215,15 +1215,11 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
gpd, lthick);
}
- /* No fill strokes, must show stroke always */
- if ((gp_style->flag & GP_STYLE_STROKE_SHOW) ||
- (gpd->runtime.sbuffer_sflag & GP_STROKE_NOFILL))
- {
- DRW_shgroup_call_add(
- stl->g_data->shgrps_drawing_stroke,
- e_data->batch_buffer_stroke,
- stl->storage->unit_matrix);
- }
+ /* buffer strokes, must show stroke always */
+ DRW_shgroup_call_add(
+ stl->g_data->shgrps_drawing_stroke,
+ e_data->batch_buffer_stroke,
+ stl->storage->unit_matrix);
if ((gpd->runtime.sbuffer_size >= 3) &&
(gpd->runtime.sfill[3] > GPENCIL_ALPHA_OPACITY_THRESH) &&
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index d9e36f5bf8c..e1f66758007 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -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) {
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) {