+ BKE_scene_layer_base_deselect_all(sl);
+
+ lc = BKE_layer_collection_active(sl);
+ if (lc == NULL) {
+ BLI_assert(BLI_listbase_count_ex(&sl->layer_collections, 1) == 0);
+ /* when there is no collection linked to this SceneLayer, create one */
+ SceneCollection *sc = BKE_collection_add(data->scene, NULL, NULL);
+ lc = BKE_collection_link(sl, sc);
+ }