diff options
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_cache_utils.c')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_cache_utils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index 2b811f1d52e..d97bf9255d2 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -159,7 +159,7 @@ void gpencil_object_cache_sort(GPENCIL_PrivateData *pd) } } - /* Join both lists, adding infront. */ + /* Join both lists, adding in front. */ if (pd->tobjects_infront.first != NULL) { if (pd->tobjects.last != NULL) { pd->tobjects.last->next = pd->tobjects_infront.first; @@ -265,8 +265,10 @@ GPENCIL_tLayer *gpencil_layer_cache_add(GPENCIL_PrivateData *pd, GPENCIL_VERTEX_MODE(gpd) || pd->is_render; bool is_masked = (gpl->flag & GP_LAYER_USE_MASK) && !BLI_listbase_is_empty(&gpl->mask_layers); - float vert_col_opacity = (overide_vertcol) ? (is_vert_col_mode ? 1.0f : 0.0f) : - gpl->vertex_paint_opacity; + float vert_col_opacity = (overide_vertcol) ? + (is_vert_col_mode ? pd->vertex_paint_opacity : 0.0f) : + pd->is_render ? gpl->vertex_paint_opacity : + pd->vertex_paint_opacity; /* Negate thickness sign to tag that strokes are in screen space. * Convert to world units (by default, 1 meter = 2000 px). */ float thickness_scale = (is_screenspace) ? -1.0f : (gpd->pixfactor / GPENCIL_PIXEL_FACTOR); |