diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-03-12 19:33:27 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-03-12 19:33:48 +0300 |
commit | 38ba02285846423994c1c58f6e8477ab432c68a7 (patch) | |
tree | df349cfcc5e1c2cc61396dd202d8e0045a24b46c /source/blender/editors/animation | |
parent | 741888ce086cffadd634e2877e7294b56e3d607b (diff) |
Fix T66505: Dope Sheet shows empty Grease Pencil/Annotation layers
The behaviour of GP layers is the same as annotation layers: they show
in the dope sheet regardless of whether they have frames or not. This is
easily resolved by adding some extra filtering.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index c1cd24f5a3c..8dfc9cd8d1a 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1735,6 +1735,11 @@ static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data, continue; } + /* Skip empty layers. */ + if (BLI_listbase_is_empty(&gpl->frames)) { + continue; + } + /* add to list */ ANIMCHANNEL_NEW_CHANNEL(gpl, ANIMTYPE_GPLAYER, gpd, NULL); } |