Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-09 14:40:34 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-09 16:17:17 +0300
commit03fc491048f9efef67033a91d5a37ee0d9d7ec79 (patch)
tree6f628507b9f6bdfcda157fd6c414c8bcdb7762bc /source/blender/editors
parentd3b80c4734d1cc5ece8d3eca5f95068eaec85e81 (diff)
Outliner: move filter options to popover.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c5
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c43
3 files changed, 19 insertions, 32 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index fd2b463f91b..1cfe5b16fe1 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -95,10 +95,7 @@ static int outliner_objects_collection_poll(bContext *C)
}
/* Groups don't support filtering. */
- if ((so->outlinevis != SO_GROUPS) &&
- ((so->filter & (SO_FILTER_ENABLE | SO_FILTER_NO_COLLECTION)) ==
- (SO_FILTER_ENABLE | SO_FILTER_NO_COLLECTION)))
- {
+ if ((so->outlinevis != SO_GROUPS) && (so->filter & SO_FILTER_NO_COLLECTION)) {
return 0;
}
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 2447a7e4a60..9207ee5ae15 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -2089,8 +2089,7 @@ static int outliner_parenting_poll(bContext *C)
}
if (soops->outlinevis == SO_COLLECTIONS) {
- return ((soops->filter & SO_FILTER_ENABLE) &&
- (soops->filter & SO_FILTER_NO_COLLECTION));
+ return (soops->filter & SO_FILTER_NO_COLLECTION);
}
}
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 2a5151a16ad..d1195621138 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1833,9 +1833,7 @@ static void outliner_store_scrolling_position(SpaceOops *soops, ARegion *ar, Out
static int outliner_exclude_filter_get(SpaceOops *soops)
{
- int exclude_filter = soops->filter & ~(SO_FILTER_OB_STATE_VISIBLE |
- SO_FILTER_OB_STATE_SELECTED |
- SO_FILTER_OB_STATE_ACTIVE);
+ int exclude_filter = soops->filter & ~SO_FILTER_OB_STATE;
if (soops->filter & SO_FILTER_SEARCH) {
if (soops->search_string[0] == 0) {
@@ -1848,26 +1846,19 @@ static int outliner_exclude_filter_get(SpaceOops *soops)
return (exclude_filter & SO_FILTER_SEARCH);
}
- if ((exclude_filter & SO_FILTER_NO_OB_ALL) == 0) {
- exclude_filter &= ~SO_FILTER_OB_TYPE;
- }
-
- if (exclude_filter & SO_FILTER_OB_STATE) {
- switch (soops->filter_state) {
- case SO_FILTER_OB_VISIBLE:
- exclude_filter |= SO_FILTER_OB_STATE_VISIBLE;
- break;
- case SO_FILTER_OB_SELECTED:
- exclude_filter |= SO_FILTER_OB_STATE_SELECTED;
- break;
- case SO_FILTER_OB_ACTIVE:
- exclude_filter |= SO_FILTER_OB_STATE_ACTIVE;
- break;
- }
- }
-
- if ((exclude_filter & SO_FILTER_ANY) == 0) {
- exclude_filter &= ~(SO_FILTER_OB_STATE);
+ switch (soops->filter_state) {
+ case SO_FILTER_OB_NONE:
+ exclude_filter |= SO_FILTER_OB_TYPE;
+ break;
+ case SO_FILTER_OB_VISIBLE:
+ exclude_filter |= SO_FILTER_OB_STATE_VISIBLE;
+ break;
+ case SO_FILTER_OB_SELECTED:
+ exclude_filter |= SO_FILTER_OB_STATE_SELECTED;
+ break;
+ case SO_FILTER_OB_ACTIVE:
+ exclude_filter |= SO_FILTER_OB_STATE_ACTIVE;
+ break;
}
return exclude_filter;
@@ -1875,13 +1866,13 @@ static int outliner_exclude_filter_get(SpaceOops *soops)
static bool outliner_element_visible_get(ViewLayer *view_layer, TreeElement *te, const int exclude_filter)
{
- if ((exclude_filter & SO_FILTER_ENABLE) == 0) {
+ if ((exclude_filter & SO_FILTER_ANY) == 0) {
return true;
}
TreeStoreElem *tselem = TREESTORE(te);
if ((tselem->type == 0) && (te->idcode == ID_OB)) {
- if ((exclude_filter & SO_FILTER_NO_OBJECT)) {
+ if ((exclude_filter & SO_FILTER_OB_TYPE) == SO_FILTER_OB_TYPE) {
return false;
}
@@ -2202,7 +2193,7 @@ void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, Spa
tenlay->directdata = view_layer;
TREESTORE(tenlay)->flag &= ~TSE_CLOSED;
- if ((soops->filter & SO_FILTER_ENABLE) && (soops->filter & SO_FILTER_NO_COLLECTION)) {
+ if (soops->filter & SO_FILTER_NO_COLLECTION) {
for (Base *base = view_layer->object_bases.first; base; base = base->next) {
TreeElement *te_object = outliner_add_element(soops, &tenlay->subtree, base->object, NULL, 0, 0);
te_object->directdata = base;