diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2017-03-01 13:21:06 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2017-03-01 13:21:06 +0300 |
commit | 14627cc2ee4b3e92e0fc8f5ffa230bb35285f0f9 (patch) | |
tree | 5d601ca49a4c137f264a5caaee62b271e77f3a7e /source/blender/editors/animation/anim_filter.c | |
parent | 6ee70312bbd1a089336e7e0716642c3b145a49c2 (diff) |
Base Refactor Tasks for gpencil filter
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 593b674858f..3e1aa300fb4 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1686,15 +1686,16 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, voi if (ads->filterflag & ADS_FILTER_GP_3DONLY) { Scene *scene = (Scene *)ads->source; - BaseLegacy *base; - + SceneLayer *sl = (SceneLayer *)ac->scene_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); } /* Objects in the scene */ - for (base = scene->base.first; base; base = base->next) { + for (base = sl->object_bases.first; base; base = base->next) { /* Only consider this object if it has got some GP data (saving on all the other tests) */ if (base->object && base->object->gpd) { Object *ob = base->object; @@ -1710,14 +1711,14 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, voi */ if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) { /* layer visibility - we check both object and base, since these may not be in sync yet */ - if ((scene->lay & (ob->lay | base->lay)) == 0) continue; + if ((base->flag & BASE_VISIBLED) == 0) continue; /* outliner restrict-flag */ if (ob->restrictflag & OB_RESTRICT_VIEW) continue; } /* check selection and object type filters */ - if ( (ads->filterflag & ADS_FILTER_ONLYSEL) && !((base->flag_legacy & SELECT) /*|| (base == scene->basact)*/) ) { + if ( (ads->filterflag & ADS_FILTER_ONLYSEL) && !((base->flag & BASE_SELECTED) /*|| (base == scene->basact)*/) ) { /* only selected should be shown */ continue; } |