diff options
author | Jaggz H <jaggz> | 2020-11-01 08:37:31 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-03 08:09:47 +0300 |
commit | fbf29086745f7e3a2ddb86eb11ed4433b4409946 (patch) | |
tree | db2ad7ed83ed3e75193f9433ada87faddbefadac /source/blender/editors/space_outliner/outliner_tree.c | |
parent | 084db58fbd10a5118baa3c7a2a94d0e51d13e77d (diff) |
Outliner: Add "Selectable" object filter
This addition to the filters allows the user to enable the
outliner tree to restrict the listing to only Selectable objects.
Differential Revision: https://developer.blender.org/D7310
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 79376686342..232585fd7e3 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2207,6 +2207,9 @@ static int outliner_exclude_filter_get(const SpaceOutliner *space_outliner) case SO_FILTER_OB_ACTIVE: exclude_filter |= SO_FILTER_OB_STATE_ACTIVE; break; + case SO_FILTER_OB_SELECTABLE: + exclude_filter |= SO_FILTER_OB_STATE_SELECTABLE; + break; } return exclude_filter; @@ -2289,6 +2292,11 @@ static bool outliner_element_visible_get(ViewLayer *view_layer, return false; } } + else if (exclude_filter & SO_FILTER_OB_STATE_SELECTABLE) { + if ((base->flag & BASE_SELECTABLE) == 0) { + return false; + } + } else { BLI_assert(exclude_filter & SO_FILTER_OB_STATE_ACTIVE); if (base != BASACT(view_layer)) { |