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:
authorJulian Eisel <julian@blender.org>2020-10-12 19:04:52 +0300
committerJulian Eisel <julian@blender.org>2020-10-12 19:21:12 +0300
commitc1cee363cd39aaf25cbf4e099a07d1c4df6d37d7 (patch)
treef1d26f13c671d36202e19f7c325e922883616335 /source/blender/editors/space_outliner/outliner_tree.c
parent6f0b082378133afd944cc6af2e992c5f9fb12cd3 (diff)
Fix T81555: Outliner object state filter not updating correctly
When changing the selected, active or visible object(s), the Outliner has to be rebuilt while using the corresponding object state filters. The object hiding operators also have to send the proper notifiers (they changed visibility without notifying about that).
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 632f7d63ad4..5ace27a7103 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -94,6 +94,7 @@ static TreeElement *outliner_add_collection_recursive(SpaceOutliner *space_outli
Collection *collection,
TreeElement *ten);
static void outliner_make_object_parent_hierarchy(ListBase *lb);
+static int outliner_exclude_filter_get(const SpaceOutliner *space_outliner);
/* ********************************************************* */
/* Persistent Data */
@@ -245,6 +246,14 @@ static TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
/* -------------------------------------------------------- */
+bool outliner_requires_rebuild_on_select_or_active_change(const SpaceOutliner *space_outliner)
+{
+ int exclude_flags = outliner_exclude_filter_get(space_outliner);
+ /* Need to rebuild tree to re-apply filter if select/active changed while filtering based on
+ * select/active. */
+ return exclude_flags & (SO_FILTER_OB_STATE_SELECTED | SO_FILTER_OB_STATE_ACTIVE);
+}
+
/**
* Check if a display mode needs a full rebuild if the open/collapsed state changes.
* Element types in these modes don't actually add children if collapsed, so the rebuild is needed.
@@ -2164,7 +2173,7 @@ static void outliner_store_scrolling_position(SpaceOutliner *space_outliner,
}
}
-static int outliner_exclude_filter_get(SpaceOutliner *space_outliner)
+static int outliner_exclude_filter_get(const SpaceOutliner *space_outliner)
{
int exclude_filter = space_outliner->filter & ~SO_FILTER_OB_STATE;