diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-04-09 11:56:48 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-04-09 11:56:59 +0300 |
commit | ee5cec4a5019853b474b044caa17c7ae34b611d7 (patch) | |
tree | e0e8f17606bf23c996ebbaf1dd9b41bc7a988448 /source/blender/editors/animation | |
parent | bd59781c66e15617b5c0cccfb07b2c0e3079b210 (diff) |
Fix T75122: Annotations: Only visible scene annotations in dopesheet
The loop of datablocks was using the scene datablock (3D View) only, but all others datablocks were ignored.
Now the loop consider any annotation datablock.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 38a19e85661..c054691ca38 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1844,11 +1844,15 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, ViewLayer *view_layer = (ViewLayer *)ac->view_layer; Base *base; - /* Active scene's GPencil block first - No parent item needed... */ - if (scene->gpd) { - items += animdata_filter_gpencil_data(anim_data, ads, scene->gpd, filter_mode); + /* Include all annotation datablocks. */ + if (((ads->filterflag & ADS_FILTER_ONLYSEL) == 0) || + (ads->filterflag & ADS_FILTER_INCL_HIDDEN)) { + LISTBASE_FOREACH (bGPdata *, gpd, &ac->bmain->gpencils) { + if (gpd->flag & GP_DATA_ANNOTATIONS) { + items += animdata_filter_gpencil_data(anim_data, ads, gpd, filter_mode); + } + } } - /* Objects in the scene */ for (base = view_layer->object_bases.first; base; base = base->next) { /* Only consider this object if it has got some GP data (saving on all the other tests) */ |