[Bf-blender-cvs] [38ba0228584] master: Fix T66505: Dope Sheet shows empty Grease Pencil/Annotation layers
Sybren A. Stüvel
noreply at git.blender.org
Thu Mar 12 17:35:20 CET 2020
Commit: 38ba02285846423994c1c58f6e8477ab432c68a7
Author: Sybren A. Stüvel
Date: Thu Mar 12 17:33:27 2020 +0100
Branches: master
https://developer.blender.org/rB38ba02285846423994c1c58f6e8477ab432c68a7
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.
===================================================================
M source/blender/editors/animation/anim_filter.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list