diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
commit | b9898ebde44d6584ea37a05aaeca8760d31ccc7b (patch) | |
tree | e6dfc796cc82b4b8b8c248c4ff29d2e2047ff84c /source/blender/draw/engines/gpencil/gpencil_draw_utils.c | |
parent | b17380971a144896b34b7863a82bbda3ff68a39f (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge branch 'master' into filebrowser_redesign
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_draw_utils.c')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 181d2efbabb..2892d0dbbaa 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -1456,7 +1456,8 @@ void gpencil_triangulate_stroke_fill(Object *ob, bGPDstroke *gps) /* Check if stencil is required */ static bool gpencil_is_stencil_required(MaterialGPencilStyle *gp_style) { - return (bool)(gp_style->stroke_style == GP_STYLE_STROKE_STYLE_SOLID); + return (bool)((gp_style->stroke_style == GP_STYLE_STROKE_STYLE_SOLID) && + ((gp_style->flag & GP_STYLE_DISABLE_STENCIL) == 0)); } /* draw stroke in drawing buffer */ @@ -1493,7 +1494,7 @@ void gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, /* Check if may need to draw the active stroke cache, only if this layer is the active layer * that is being edited. (Stroke buffer is currently stored in gp-data) */ - if (gpd->runtime.sbuffer_size > 0) { + if (gpd->runtime.sbuffer_used > 0) { if ((gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) { /* It should also be noted that sbuffer contains temporary point types * i.e. tGPspoints NOT bGPDspoints @@ -1506,7 +1507,7 @@ void gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, stl->storage->alignment_mode = (gp_style) ? gp_style->alignment_mode : GP_STYLE_FOLLOW_PATH; /* if only one point, don't need to draw buffer because the user has no time to see it */ - if (gpd->runtime.sbuffer_size > 1) { + if (gpd->runtime.sbuffer_used > 1) { if ((gp_style) && (gp_style->mode == GP_STYLE_MODE_LINE)) { stl->g_data->shgrps_drawing_stroke = gpencil_shgroup_stroke_create( vedata, @@ -1562,7 +1563,7 @@ void gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, DRW_shgroup_call( stl->g_data->shgrps_drawing_stroke, stl->g_data->batch_buffer_stroke, NULL); - if ((gpd->runtime.sbuffer_size >= 3) && + if ((gpd->runtime.sbuffer_used >= 3) && (gpd->runtime.sfill[3] > GPENCIL_ALPHA_OPACITY_THRESH) && ((gpd->runtime.sbuffer_sflag & GP_STROKE_NOFILL) == 0) && ((brush->gpencil_settings->flag & GP_BRUSH_DISSABLE_LASSO) == 0) && |