From 417ebc3845fde909fb1cd96b31581bbfa285d869 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 2 Jun 2020 17:51:57 +0200 Subject: [PATCH] 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 --- source/blender/editors/space_outliner/outliner_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }