Base Refactor Tasks for gpencil filter
This commit is contained in:
parent
6ee70312bb
commit
14627cc2ee
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue