Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/layer.c
| Show First 20 Lines • Show All 1,240 Lines • ▼ Show 20 Lines | void BKE_layer_collection_local_sync(ViewLayer *view_layer, const View3D *v3d) | ||||
| } | } | ||||
| LISTBASE_FOREACH (LayerCollection *, layer_collection, &view_layer->layer_collections) { | LISTBASE_FOREACH (LayerCollection *, layer_collection, &view_layer->layer_collections) { | ||||
| layer_collection_local_sync(view_layer, layer_collection, local_collections_uuid, true); | layer_collection_local_sync(view_layer, layer_collection, local_collections_uuid, true); | ||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * Sync the local collection for all the viewports. | |||||
| */ | |||||
| void BKE_layer_collection_local_sync_all(Main *bmain) | |||||
| { | |||||
| LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { | |||||
| LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { | |||||
| LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { | |||||
| LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | |||||
| if (area->spacetype != SPACE_VIEW3D) { | |||||
| continue; | |||||
| } | |||||
| View3D *v3d = area->spacedata.first; | |||||
| if (v3d->flag & V3D_LOCAL_COLLECTIONS) { | |||||
| BKE_layer_collection_local_sync(view_layer, v3d); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| /** | |||||
| * Isolate the collection locally | * Isolate the collection locally | ||||
| * | * | ||||
| * Same as BKE_layer_collection_isolate_local but for a viewport | * Same as BKE_layer_collection_isolate_local but for a viewport | ||||
| */ | */ | ||||
| void BKE_layer_collection_isolate_local(ViewLayer *view_layer, | void BKE_layer_collection_isolate_local(ViewLayer *view_layer, | ||||
| const View3D *v3d, | const View3D *v3d, | ||||
| LayerCollection *lc, | LayerCollection *lc, | ||||
| bool extend) | bool extend) | ||||
| ▲ Show 20 Lines • Show All 546 Lines • Show Last 20 Lines | |||||