[Bf-blender-cvs] [417ebc3845f] master: UI: Expand linked/overriden collections by default in the Outliner
Julian Eisel
noreply at git.blender.org
Tue Jun 2 18:12:38 CEST 2020
Commit: 417ebc3845fde909fb1cd96b31581bbfa285d869
Author: Julian Eisel
Date: Tue Jun 2 17:51:57 2020 +0200
Branches: master
https://developer.blender.org/rB417ebc3845fde909fb1cd96b31581bbfa285d869
UI: Expand linked/overriden collections by default in the Outliner
When linking or overriding an instanced collection, the new collection item in
the Outliner is now un-collapsed by default.
Linking and overriding is typically used in production scenes, where
collections tend to contain many items (children, grand-children, etc.). If all
collections in that hierarchy are expanded by default, the Outliner gets
flooded with items. So users ended up manually collapsing the collections.
Part of T76555.
Reviewed by: Andy Goralczyk, Bastien Montange.
Differential Revision: https://developer.blender.org/D7626
===================================================================
M source/blender/editors/space_outliner/outliner_tree.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 7bb62b0d1e2..d6efe683673 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1427,9 +1427,9 @@ static void outliner_add_layer_collections_recursive(SpaceOutliner *soops,
ten->name = id->name + 2;
ten->directdata = lc;
- /* Open by default. */
+ /* Open by default, except linked collections, which may contain many elements. */
TreeStoreElem *tselem = TREESTORE(ten);
- if (!tselem->used) {
+ if (!(tselem->used || ID_IS_LINKED(id) || ID_IS_OVERRIDE_LIBRARY(id))) {
tselem->flag &= ~TSE_CLOSED;
}
More information about the Bf-blender-cvs
mailing list