diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-02-18 17:34:52 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-02-18 17:34:52 +0300 |
commit | f1f8074b8daaaaba0e90d9cfbaffc66d9c702fd3 (patch) | |
tree | 5719e5abf7908529c5950006614192d7c8e9aef3 /source | |
parent | 75580fa6a661eba58f9d39f8332985b1b72d3bc3 (diff) |
GPencil: Fix unreported broken use only lines in multiframe
This option was broken since the draw engine refactor and it was impossible to display only edit lines for multiframe mode.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 153dcfb6ea7..57c69398ef2 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -140,7 +140,7 @@ void GPENCIL_engine_init(void *ved) /* For non active frame, use only lines in multiedit mode. */ const bool overlays_on = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0; - stl->pd->use_multiedit_lines_only = !overlays_on || + stl->pd->use_multiedit_lines_only = overlays_on && (v3d->gp_flag & V3D_GP_SHOW_MULTIEDIT_LINES) != 0; const bool shmode_xray_support = v3d->shading.type <= OB_SOLID; @@ -495,10 +495,10 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl, (!iter->pd->simplify_fill) && ((gps->flag & GP_STROKE_NOFILL) == 0); bool only_lines = gpl && gpf && gpl->actframe != gpf && iter->pd->use_multiedit_lines_only; - bool hide_onion = gpl && gpf && gpf->runtime.onion_id != 0 && - ((gp_style->flag & GP_MATERIAL_HIDE_ONIONSKIN) != 0); - - if (hide_material || (!show_stroke && !show_fill) || (only_lines && hide_onion) || hide_onion) { + bool is_onion = gpl && gpf && gpf->runtime.onion_id != 0; + bool hide_onion = is_onion && ((gp_style->flag & GP_MATERIAL_HIDE_ONIONSKIN) != 0); + if ((hide_material) || (!show_stroke && !show_fill) || (only_lines && !is_onion) || + (hide_onion)) { return; } |