Outliner: expand view layer collections by default, revealing objects.

This commit is contained in:
Brecht Van Lommel
2018-12-31 16:36:25 +01:00
parent c1d82e5849
commit 82e0739f64

View File

@@ -1313,6 +1313,12 @@ static void outliner_add_layer_collections_recursive(
ten->name = id->name + 2;
ten->directdata = lc;
/* Open by default. */
TreeStoreElem *tselem = TREESTORE(ten);
if (!tselem->used) {
tselem->flag &= ~TSE_CLOSED;
}
const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0;
if (exclude ||
((layer->runtime_flag & VIEW_LAYER_HAS_HIDE) &&