diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-09 03:09:08 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-16 21:30:54 +0300 |
commit | eb92ac05d6f850ccdbc0ed636763669f5d1e765e (patch) | |
tree | 2ecbc890273496c568d2d28f30071bad3a2c213a /source/blender/editors/space_outliner/outliner_tree.c | |
parent | 01006aa45d1afc9f45d2f6a42f6981f5c92af051 (diff) |
Outliner: invisible object filter
Adds an invisible object filter in the outliner to show hidden
objects. This is useful to quickly locate hidden items in a large outliner
tree and easily toggle visibilty back on. Invisible refers to an object
being hidden, or viewport visibility restricted.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index cc062467dbe..7107b5539c8 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2008,6 +2008,9 @@ static int outliner_exclude_filter_get(SpaceOutliner *soops) case SO_FILTER_OB_VISIBLE: exclude_filter |= SO_FILTER_OB_STATE_VISIBLE; break; + case SO_FILTER_OB_INVISIBLE: + exclude_filter |= SO_FILTER_OB_STATE_INVISIBLE; + break; case SO_FILTER_OB_SELECTED: exclude_filter |= SO_FILTER_OB_STATE_SELECTED; break; @@ -2086,6 +2089,11 @@ static bool outliner_element_visible_get(ViewLayer *view_layer, return false; } } + else if (exclude_filter & SO_FILTER_OB_STATE_INVISIBLE) { + if ((base->flag & BASE_VISIBLE) != 0) { + return false; + } + } else if (exclude_filter & SO_FILTER_OB_STATE_SELECTED) { if ((base->flag & BASE_SELECTED) == 0) { return false; |