diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-03-15 23:48:18 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-03-15 23:48:18 +0300 |
commit | 0d0d68d39dad8e14b80489bc28d591fc6eff5f21 (patch) | |
tree | f29c1f221cc54a3c6814f4ed6cb19c2c825023be /source/blender/editors/space_outliner | |
parent | a44921485430fce94af691c8d063f6207e5bc562 (diff) |
Outliner: Don't show master collection itself in "Master Collection Tree"
It would always be the only highest-level element in the tree, without
serving a real purpose. Even collapsing it wouldn't make much sense.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 81d85140a75..02ec8b314dc 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1428,21 +1428,17 @@ static bool outliner_scene_collections_reorder_poll( return true; } -static void outliner_add_scene_collection_init(TreeElement *te, SceneCollection *collection) -{ - te->name = collection->name; - te->directdata = collection; - te->reinsert = outliner_scene_collections_reorder; - te->reinsert_poll = outliner_scene_collections_reorder_poll; -} - static void outliner_add_scene_collections_recursive( SpaceOops *soops, ListBase *tree, ListBase *scene_collections, TreeElement *parent_ten) { for (SceneCollection *collection = scene_collections->first; collection; collection = collection->next) { TreeElement *ten = outliner_add_element(soops, tree, collection, parent_ten, TSE_SCENE_COLLECTION, 0); - outliner_add_scene_collection_init(ten, collection); + ten->name = collection->name; + ten->directdata = collection; + ten->reinsert = outliner_scene_collections_reorder; + ten->reinsert_poll = outliner_scene_collections_reorder_poll; + for (LinkData *link = collection->objects.first; link; link = link->next) { outliner_add_element(soops, &ten->subtree, link->data, ten, 0, 0); } @@ -1454,10 +1450,7 @@ static void outliner_add_scene_collections_recursive( static void outliner_add_collections_master(SpaceOops *soops, Scene *scene) { SceneCollection *master = BKE_collection_master(scene); - TreeElement *ten = outliner_add_element(soops, &soops->tree, master, NULL, TSE_SCENE_COLLECTION, 0); - - outliner_add_scene_collection_init(ten, master); - outliner_add_scene_collections_recursive(soops, &ten->subtree, &master->scene_collections, ten); + outliner_add_scene_collections_recursive(soops, &soops->tree, &master->scene_collections, NULL); } /* ======================================================= */ |