diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-09-05 18:14:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-08 16:23:21 +0300 |
commit | 173d8edb0bb6e017235ef85a10963f39725c29ef (patch) | |
tree | fc40e57981ed83c0a1bb3532da322843a5571238 /source/blender/editors/animation | |
parent | b5fc8f611e3948a19c26d425496d76079506f480 (diff) |
Cleanup: make meaning of base visibility flags more clear
Rename, add comments, and use flag in the depsgraph to ensure the logic
matches.
Differential Revision: https://developer.blender.org/D15883
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 2442a5910a0..6dc11292a3a 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1876,8 +1876,8 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, 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 ((base->flag & BASE_VISIBLE_DEPSGRAPH) == 0 || - (base->flag & BASE_VISIBLE_VIEWLAYER) == 0) { + if ((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) == 0 || + (base->flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) == 0) { continue; } @@ -3089,7 +3089,8 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, */ 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 ((base->flag & BASE_VISIBLE_DEPSGRAPH) == 0 || (base->flag & BASE_VISIBLE_VIEWLAYER) == 0) { + if ((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) == 0 || + (base->flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) == 0) { return false; } |