diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-10-22 21:01:39 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-10-22 21:01:39 +0300 |
commit | 8432452f6fcb5f96df900250700f7fed7dfa32b5 (patch) | |
tree | 6f606bb8361f7ab9cf5e7d1ec650519503c2c7b3 /source/blender/blenkernel/intern/gpencil.c | |
parent | 6180ecaea501ef97efd7eb022ed15d9740191224 (diff) |
GPencil: Fix unreported crash using layer solo mode and masked layers
The solo mode was skipping the layer creation data and the loop of masks expect to have all layers in the array or the loop crash.
The solution is just create the layer array data for the layer, but don't draw any stroke.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil.c')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 31cd812f8df..6c6ca996caa 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -2549,17 +2549,17 @@ void BKE_gpencil_visible_stroke_iter(ViewLayer *view_layer, /* Use evaluated frame (with modifiers for active stroke)/ */ act_gpf = gpl->actframe; if (act_gpf) { + act_gpf->runtime.onion_id = 0; + if (layer_cb) { + layer_cb(gpl, act_gpf, NULL, thunk); + } + /* If layer solo mode and Paint mode, only keyframes with data are displayed. */ if (GPENCIL_PAINT_MODE(gpd) && (gpl->flag & GP_LAYER_SOLO_MODE) && (act_gpf->framenum != cfra)) { continue; } - act_gpf->runtime.onion_id = 0; - if (layer_cb) { - layer_cb(gpl, act_gpf, NULL, thunk); - } - LISTBASE_FOREACH (bGPDstroke *, gps, &act_gpf->strokes) { if (gps->totpoints == 0) { continue; |