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:
authorHans Goudey <h.goudey@me.com>2021-02-19 22:56:49 +0300
committerHans Goudey <h.goudey@me.com>2021-02-19 22:56:49 +0300
commit34580748dcf0a3656dd634fc90cb00ec27367376 (patch)
tree75d813f3697481084410943c61a42d3bbf5f748c /source/blender/editors/space_outliner/tree
parent55700ac3906f182be8d3dff6f7d63cc27463d91b (diff)
Fix T83027: Incorrect outliner collection state after operator
The "Hide Collection" operators assigned to the number keys in edit mode trigger a redraw of the outliner, but as an optimization, they do *not* trigger a rebuild of the tree. This optimization is valid because unlike the collection exclude toggle, the heirarchy is not affected by collection visibility. However, it means that currently you must trigger a rebuild to get the correct "grayed out" status after using the operator. Rather than trigger a rebuild in this case to solve the bug, this patch moves the decision for whether to gray out the text of a tree element to the draw step rather than the build step. This means that any change to the corresponding properties doesn't require a full tree rebuild. Note that changing the "hide_viewport" property from the outliner still causes a tree rebuild. I think that's because of the checks in `outliner_collection_set_flag_recursive_fn`. That could be optimized in the future. Differential Revision: https://developer.blender.org/D10240
Diffstat (limited to 'source/blender/editors/space_outliner/tree')
-rw-r--r--source/blender/editors/space_outliner/tree/tree_display_view_layer.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
index f7740f4648f..afdee185d0d 100644
--- a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
+++ b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
@@ -143,10 +143,6 @@ void TreeDisplayViewLayer::add_layer_collections_recursive(ListBase &tree,
if (!(tselem->used || ID_IS_LINKED(id) || ID_IS_OVERRIDE_LIBRARY(id))) {
tselem->flag &= ~TSE_CLOSED;
}
-
- if (exclude || (lc->runtime_flag & LAYER_COLLECTION_VISIBLE_VIEW_LAYER) == 0) {
- ten->flag |= TE_DISABLED;
- }
}
add_layer_collections_recursive(ten->subtree, lc->layer_collections, *ten);
@@ -165,10 +161,6 @@ void TreeDisplayViewLayer::add_layer_collection_objects(ListBase &tree,
TreeElement *te_object = outliner_add_element(
&space_outliner_, &tree, base->object, &ten, 0, 0);
te_object->directdata = base;
-
- if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) {
- te_object->flag |= TE_DISABLED;
- }
}
}