diff options
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
4 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index dcefb5528b2..67f454b608b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -2125,9 +2125,10 @@ void DepsgraphNodeBuilder::build_scene_audio(Scene *scene) }); } -void DepsgraphNodeBuilder::build_scene_speakers(Scene * /*scene*/, ViewLayer *view_layer) +void DepsgraphNodeBuilder::build_scene_speakers(Scene *scene, ViewLayer *view_layer) { - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + BKE_view_layer_synced_ensure(scene, view_layer); + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) { Object *object = base->object; if (object->type != OB_SPEAKER || !need_pull_base_into_graph(base)) { continue; diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc index 5af9e7d4fe9..d7420b91db4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc @@ -90,7 +90,8 @@ void DepsgraphNodeBuilder::build_view_layer(Scene *scene, * but object is expected to be an original one. Hence we go into some * tricks here iterating over the view layer. */ int base_index = 0; - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + BKE_view_layer_synced_ensure(scene, view_layer); + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) { /* object itself */ if (!need_pull_base_into_graph(base)) { continue; diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 313d4996dcf..39dad18ff2b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -3050,9 +3050,10 @@ void DepsgraphRelationBuilder::build_scene_audio(Scene *scene) } } -void DepsgraphRelationBuilder::build_scene_speakers(Scene * /*scene*/, ViewLayer *view_layer) +void DepsgraphRelationBuilder::build_scene_speakers(Scene *scene, ViewLayer *view_layer) { - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + BKE_view_layer_synced_ensure(scene, view_layer); + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) { Object *object = base->object; if (object->type != OB_SPEAKER || !need_pull_base_into_graph(base)) { continue; diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc index d723e5beb75..938c0979de9 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc @@ -75,11 +75,12 @@ void DepsgraphRelationBuilder::build_view_layer(Scene *scene, { /* Setup currently building context. */ scene_ = scene; + BKE_view_layer_synced_ensure(scene, view_layer); /* Scene objects. */ /* NOTE: Nodes builder requires us to pass CoW base because it's being * passed to the evaluation functions. During relations builder we only * do nullptr-pointer check of the base, so it's fine to pass original one. */ - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) { if (need_pull_base_into_graph(base)) { build_object_from_view_layer_base(base->object); } |