diff options
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 12472cf9dc5..fe11dc99bac 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -975,6 +975,23 @@ void BKE_view_layer_synced_ensure(const Scene *scene, struct ViewLayer *view_lay } } +void BKE_scene_view_layers_synced_ensure(const Scene *scene) +{ + LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { + BKE_view_layer_synced_ensure(scene, view_layer); + } +} + +void BKE_main_view_layers_synced_ensure(const Main *bmain) +{ + for (const Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { + BKE_scene_view_layers_synced_ensure(scene); + } + + /* NOTE: This is not (yet?) covered by the dirty tag and deffered resync system */ + BKE_layer_collection_local_sync_all(bmain); +} + static void layer_collection_objects_sync(ViewLayer *view_layer, LayerCollection *layer, ListBase *r_lb_new_object_bases, |