Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-08-18 16:51:32 +0300
committerJacques Lucke <jacques@blender.org>2020-08-18 16:51:32 +0300
commit6a4f5e6a8c3990330fe8839e39e0094ba5410ba4 (patch)
tree231d0dd3441ed6c11e801da68ab20d6694f191a7
parentd9f7cbb8af07b27d3825453a036557a0e0dab37b (diff)
Depsgraph: simplify build API
Reviewers: sergey, sybren Differential Revision: https://developer.blender.org/D8611
-rw-r--r--source/blender/blenkernel/intern/scene.c8
-rw-r--r--source/blender/blenkernel/intern/seqprefetch.c2
-rw-r--r--source/blender/blenloader/tests/blendfile_loading_base_test.cc2
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_build.h35
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline.cc11
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline.h2
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_all_objects.cc7
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_all_objects.h2
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_compositor.cc5
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_compositor.h3
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_from_ids.cc5
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_from_ids.h3
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_render.cc6
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_render.h2
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_view_layer.cc7
-rw-r--r--source/blender/depsgraph/intern/builder/pipeline_view_layer.h2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc40
-rw-r--r--source/blender/depsgraph/intern/depsgraph_debug.cc2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c2
-rw-r--r--source/blender/editors/animation/anim_motion_paths.c2
-rw-r--r--source/blender/editors/object/object_bake_api.c2
-rw-r--r--source/blender/editors/scene/scene_edit.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c3
-rw-r--r--source/blender/editors/transform/transform_convert_object.c2
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp3
-rw-r--r--source/blender/io/alembic/exporter/abc_export_capi.cc11
-rw-r--r--source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc3
-rw-r--r--source/blender/io/usd/intern/usd_capi.cc5
-rw-r--r--source/blender/render/intern/source/external_engine.c2
-rw-r--r--source/blender/render/intern/source/pipeline.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c2
31 files changed, 62 insertions, 123 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index f95ee27ed58..631c5ed330d 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1485,7 +1485,7 @@ static void scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain, bool on
for (int pass = 0; pass < 2; pass++) {
/* (Re-)build dependency graph if needed. */
- DEG_graph_relations_update(depsgraph, bmain, scene, view_layer);
+ DEG_graph_relations_update(depsgraph);
/* Uncomment this to check if graph was properly tagged for update. */
// DEG_debug_graph_relations_validate(depsgraph, bmain, scene);
/* Flush editing data if needed. */
@@ -1512,7 +1512,7 @@ static void scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain, bool on
* be tagged for an update anyway.
*
* If there are no relations changed by the callback this call will do nothing. */
- DEG_graph_relations_update(depsgraph, bmain, scene, view_layer);
+ DEG_graph_relations_update(depsgraph);
}
/* Inform editors about possible changes. */
DEG_ids_check_recalc(bmain, depsgraph, scene, view_layer, false);
@@ -1556,7 +1556,7 @@ void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
*/
BKE_image_editors_update_frame(bmain, scene->r.cfra);
BKE_sound_set_cfra(scene->r.cfra);
- DEG_graph_relations_update(depsgraph, bmain, scene, view_layer);
+ DEG_graph_relations_update(depsgraph);
/* Update all objects: drivers, matrices, displists, etc. flags set
* by depgraph or manual, no layer check here, gets correct flushed.
*
@@ -1579,7 +1579,7 @@ void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
/* NOTE: Similar to this case in scene_graph_update_tagged(). Need to ensure that
* DEG_ids_clear_recalc() doesn't access freed memory of possibly removed ID. */
- DEG_graph_relations_update(depsgraph, bmain, scene, view_layer);
+ DEG_graph_relations_update(depsgraph);
}
/* Inform editors about possible changes. */
diff --git a/source/blender/blenkernel/intern/seqprefetch.c b/source/blender/blenkernel/intern/seqprefetch.c
index 795086fffa4..c442b7ca780 100644
--- a/source/blender/blenkernel/intern/seqprefetch.c
+++ b/source/blender/blenkernel/intern/seqprefetch.c
@@ -220,7 +220,7 @@ static void seq_prefetch_init_depsgraph(PrefetchJob *pfjob)
DEG_debug_name_set(pfjob->depsgraph, "SEQUENCER PREFETCH");
/* Make sure there is a correct evaluated scene pointer. */
- DEG_graph_build_for_render_pipeline(pfjob->depsgraph, bmain, scene, view_layer);
+ DEG_graph_build_for_render_pipeline(pfjob->depsgraph);
/* Update immediately so we have proper evaluated scene. */
seq_prefetch_update_depsgraph(pfjob);
diff --git a/source/blender/blenloader/tests/blendfile_loading_base_test.cc b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
index d74bab4b31c..c743e6bcd3f 100644
--- a/source/blender/blenloader/tests/blendfile_loading_base_test.cc
+++ b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
@@ -148,7 +148,7 @@ void BlendfileLoadingBaseTest::depsgraph_create(eEvaluationMode depsgraph_evalua
{
depsgraph = DEG_graph_new(
bfile->main, bfile->curscene, bfile->cur_view_layer, depsgraph_evaluation_mode);
- DEG_graph_build_from_view_layer(depsgraph, bfile->main, bfile->curscene, bfile->cur_view_layer);
+ DEG_graph_build_from_view_layer(depsgraph);
BKE_scene_graph_update_tagged(depsgraph, bfile->main);
}
diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h
index dd52c97e03f..2147a584765 100644
--- a/source/blender/depsgraph/DEG_depsgraph_build.h
+++ b/source/blender/depsgraph/DEG_depsgraph_build.h
@@ -51,50 +51,29 @@ extern "C" {
/* Graph Building -------------------------------- */
/* Build depsgraph for the given scene, and dump results in given graph container. */
-void DEG_graph_build_from_view_layer(struct Depsgraph *graph,
- struct Main *bmain,
- struct Scene *scene,
- struct ViewLayer *view_layer);
+void DEG_graph_build_from_view_layer(struct Depsgraph *graph);
/* Build depsgraph for all objects (so also invisible ones) in the given view layer. */
-void DEG_graph_build_for_all_objects(struct Depsgraph *graph,
- struct Main *bmain,
- struct Scene *scene,
- struct ViewLayer *view_layer);
+void DEG_graph_build_for_all_objects(struct Depsgraph *graph);
/* Special version of builder which produces dependency graph suitable for the render pipeline.
* It will contain sequencer and compositor (if needed) and all their dependencies. */
-void DEG_graph_build_for_render_pipeline(struct Depsgraph *graph,
- struct Main *bmain,
- struct Scene *scene,
- struct ViewLayer *view_layer);
+void DEG_graph_build_for_render_pipeline(struct Depsgraph *graph);
/* Builds minimal dependency graph for compositor preview.
*
* Note that compositor editor might have pinned node tree, which is different from scene's node
* tree.
*/
-void DEG_graph_build_for_compositor_preview(struct Depsgraph *graph,
- struct Main *bmain,
- struct Scene *scene,
- struct ViewLayer *view_layer,
- struct bNodeTree *nodetree);
-
-void DEG_graph_build_from_ids(struct Depsgraph *graph,
- struct Main *bmain,
- struct Scene *scene,
- struct ViewLayer *view_layer,
- struct ID **ids,
- const int num_ids);
+void DEG_graph_build_for_compositor_preview(struct Depsgraph *graph, struct bNodeTree *nodetree);
+
+void DEG_graph_build_from_ids(struct Depsgraph *graph, struct ID **ids, const int num_ids);
/* Tag relations from the given graph for update. */
void DEG_graph_tag_relations_update(struct Depsgraph *graph);
/* Create or update relations in the specified graph. */
-void DEG_graph_relations_update(struct Depsgraph *graph,
- struct Main *bmain,
- struct Scene *scene,
- struct ViewLayer *view_layer);
+void DEG_graph_relations_update(struct Depsgraph *graph);
/* Tag all relations in the database for update.*/
void DEG_relations_tag_update(struct Main *bmain);
diff --git a/source/blender/depsgraph/intern/builder/pipeline.cc b/source/blender/depsgraph/intern/builder/pipeline.cc
index d6893ba11d8..b13077e4792 100644
--- a/source/blender/depsgraph/intern/builder/pipeline.cc
+++ b/source/blender/depsgraph/intern/builder/pipeline.cc
@@ -33,14 +33,11 @@
namespace blender {
namespace deg {
-AbstractBuilderPipeline::AbstractBuilderPipeline(::Depsgraph *graph,
- Main *bmain,
- Scene *scene,
- ViewLayer *view_layer)
+AbstractBuilderPipeline::AbstractBuilderPipeline(::Depsgraph *graph)
: deg_graph_(reinterpret_cast<Depsgraph *>(graph)),
- bmain_(bmain),
- scene_(scene),
- view_layer_(view_layer),
+ bmain_(deg_graph_->bmain),
+ scene_(deg_graph_->scene),
+ view_layer_(deg_graph_->view_layer),
builder_cache_()
{
}
diff --git a/source/blender/depsgraph/intern/builder/pipeline.h b/source/blender/depsgraph/intern/builder/pipeline.h
index 2c9c78bb2cb..d98d834932c 100644
--- a/source/blender/depsgraph/intern/builder/pipeline.h
+++ b/source/blender/depsgraph/intern/builder/pipeline.h
@@ -49,7 +49,7 @@ class DepsgraphRelationBuilder;
*/
class AbstractBuilderPipeline {
public:
- AbstractBuilderPipeline(::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer);
+ AbstractBuilderPipeline(::Depsgraph *graph);
virtual ~AbstractBuilderPipeline();
void build();
diff --git a/source/blender/depsgraph/intern/builder/pipeline_all_objects.cc b/source/blender/depsgraph/intern/builder/pipeline_all_objects.cc
index c926ff7541a..81d239239be 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_all_objects.cc
+++ b/source/blender/depsgraph/intern/builder/pipeline_all_objects.cc
@@ -58,11 +58,8 @@ class AllObjectsRelationBuilder : public DepsgraphRelationBuilder {
} // namespace
-AllObjectsBuilderPipeline::AllObjectsBuilderPipeline(::Depsgraph *graph,
- Main *bmain,
- Scene *scene,
- ViewLayer *view_layer)
- : ViewLayerBuilderPipeline(graph, bmain, scene, view_layer)
+AllObjectsBuilderPipeline::AllObjectsBuilderPipeline(::Depsgraph *graph)
+ : ViewLayerBuilderPipeline(graph)
{
}
diff --git a/source/blender/depsgraph/intern/builder/pipeline_all_objects.h b/source/blender/depsgraph/intern/builder/pipeline_all_objects.h
index 94f00ae840b..11ca2314331 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_all_objects.h
+++ b/source/blender/depsgraph/intern/builder/pipeline_all_objects.h
@@ -33,7 +33,7 @@ namespace deg {
* (and their dependencies). */
class AllObjectsBuilderPipeline : public ViewLayerBuilderPipeline {
public:
- AllObjectsBuilderPipeline(::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer);
+ AllObjectsBuilderPipeline(::Depsgraph *graph);
protected:
virtual unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
diff --git a/source/blender/depsgraph/intern/builder/pipeline_compositor.cc b/source/blender/depsgraph/intern/builder/pipeline_compositor.cc
index 3e56f17fc7e..2b9922851c1 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_compositor.cc
+++ b/source/blender/depsgraph/intern/builder/pipeline_compositor.cc
@@ -26,9 +26,8 @@
namespace blender {
namespace deg {
-CompositorBuilderPipeline::CompositorBuilderPipeline(
- ::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer, bNodeTree *nodetree)
- : AbstractBuilderPipeline(graph, bmain, scene, view_layer), nodetree_(nodetree)
+CompositorBuilderPipeline::CompositorBuilderPipeline(::Depsgraph *graph, bNodeTree *nodetree)
+ : AbstractBuilderPipeline(graph), nodetree_(nodetree)
{
deg_graph_->is_render_pipeline_depsgraph = true;
}
diff --git a/source/blender/depsgraph/intern/builder/pipeline_compositor.h b/source/blender/depsgraph/intern/builder/pipeline_compositor.h
index 892ece7c2a4..46f1e3694d3 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_compositor.h
+++ b/source/blender/depsgraph/intern/builder/pipeline_compositor.h
@@ -32,8 +32,7 @@ namespace deg {
class CompositorBuilderPipeline : public AbstractBuilderPipeline {
public:
- CompositorBuilderPipeline(
- ::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer, bNodeTree *nodetree);
+ CompositorBuilderPipeline(::Depsgraph *graph, bNodeTree *nodetree);
protected:
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
diff --git a/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc b/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc
index c42bccaadec..87cfeb46693 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc
+++ b/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc
@@ -114,9 +114,8 @@ class DepsgraphFromIDsRelationBuilder : public DepsgraphRelationBuilder {
} // namespace
-FromIDsBuilderPipeline::FromIDsBuilderPipeline(
- ::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer, Span<ID *> ids)
- : AbstractBuilderPipeline(graph, bmain, scene, view_layer), ids_(ids)
+FromIDsBuilderPipeline::FromIDsBuilderPipeline(::Depsgraph *graph, Span<ID *> ids)
+ : AbstractBuilderPipeline(graph), ids_(ids)
{
}
diff --git a/source/blender/depsgraph/intern/builder/pipeline_from_ids.h b/source/blender/depsgraph/intern/builder/pipeline_from_ids.h
index a52a9f6f252..79fcfc52446 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_from_ids.h
+++ b/source/blender/depsgraph/intern/builder/pipeline_from_ids.h
@@ -43,8 +43,7 @@ namespace deg {
class FromIDsBuilderPipeline : public AbstractBuilderPipeline {
public:
- FromIDsBuilderPipeline(
- ::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer, Span<ID *> ids);
+ FromIDsBuilderPipeline(::Depsgraph *graph, Span<ID *> ids);
protected:
virtual unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
diff --git a/source/blender/depsgraph/intern/builder/pipeline_render.cc b/source/blender/depsgraph/intern/builder/pipeline_render.cc
index 50a37d0d3e4..3b065f7f1bc 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_render.cc
+++ b/source/blender/depsgraph/intern/builder/pipeline_render.cc
@@ -26,11 +26,7 @@
namespace blender {
namespace deg {
-RenderBuilderPipeline::RenderBuilderPipeline(::Depsgraph *graph,
- Main *bmain,
- Scene *scene,
- ViewLayer *view_layer)
- : AbstractBuilderPipeline(graph, bmain, scene, view_layer)
+RenderBuilderPipeline::RenderBuilderPipeline(::Depsgraph *graph) : AbstractBuilderPipeline(graph)
{
deg_graph_->is_render_pipeline_depsgraph = true;
}
diff --git a/source/blender/depsgraph/intern/builder/pipeline_render.h b/source/blender/depsgraph/intern/builder/pipeline_render.h
index df7f9e0de68..91a4be137b6 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_render.h
+++ b/source/blender/depsgraph/intern/builder/pipeline_render.h
@@ -30,7 +30,7 @@ namespace deg {
class RenderBuilderPipeline : public AbstractBuilderPipeline {
public:
- RenderBuilderPipeline(::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer);
+ RenderBuilderPipeline(::Depsgraph *graph);
protected:
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
diff --git a/source/blender/depsgraph/intern/builder/pipeline_view_layer.cc b/source/blender/depsgraph/intern/builder/pipeline_view_layer.cc
index 3223f17f349..f1852a40a10 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_view_layer.cc
+++ b/source/blender/depsgraph/intern/builder/pipeline_view_layer.cc
@@ -26,11 +26,8 @@
namespace blender {
namespace deg {
-ViewLayerBuilderPipeline::ViewLayerBuilderPipeline(::Depsgraph *graph,
- Main *bmain,
- Scene *scene,
- ViewLayer *view_layer)
- : AbstractBuilderPipeline(graph, bmain, scene, view_layer)
+ViewLayerBuilderPipeline::ViewLayerBuilderPipeline(::Depsgraph *graph)
+ : AbstractBuilderPipeline(graph)
{
}
diff --git a/source/blender/depsgraph/intern/builder/pipeline_view_layer.h b/source/blender/depsgraph/intern/builder/pipeline_view_layer.h
index fbd7b98acad..aa85dd7a47b 100644
--- a/source/blender/depsgraph/intern/builder/pipeline_view_layer.h
+++ b/source/blender/depsgraph/intern/builder/pipeline_view_layer.h
@@ -30,7 +30,7 @@ namespace deg {
class ViewLayerBuilderPipeline : public AbstractBuilderPipeline {
public:
- ViewLayerBuilderPipeline(::Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer);
+ ViewLayerBuilderPipeline(::Depsgraph *graph);
protected:
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index dc49534eb2d..96c17ae4dc5 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -210,49 +210,33 @@ struct Depsgraph *DEG_get_graph_from_handle(struct DepsNodeHandle *node_handle)
/* Graph Building API's */
/* Build depsgraph for the given scene layer, and dump results in given graph container. */
-void DEG_graph_build_from_view_layer(Depsgraph *graph,
- Main *bmain,
- Scene *scene,
- ViewLayer *view_layer)
+void DEG_graph_build_from_view_layer(Depsgraph *graph)
{
- deg::ViewLayerBuilderPipeline builder(graph, bmain, scene, view_layer);
+ deg::ViewLayerBuilderPipeline builder(graph);
builder.build();
}
-void DEG_graph_build_for_all_objects(struct Depsgraph *graph,
- struct Main *bmain,
- struct Scene *scene,
- struct ViewLayer *view_layer)
+void DEG_graph_build_for_all_objects(struct Depsgraph *graph)
{
- deg::AllObjectsBuilderPipeline builder(graph, bmain, scene, view_layer);
+ deg::AllObjectsBuilderPipeline builder(graph);
builder.build();
}
-void DEG_graph_build_for_render_pipeline(Depsgraph *graph,
- Main *bmain,
- Scene *scene,
- ViewLayer *view_layer)
+void DEG_graph_build_for_render_pipeline(Depsgraph *graph)
{
- deg::RenderBuilderPipeline builder(graph, bmain, scene, view_layer);
+ deg::RenderBuilderPipeline builder(graph);
builder.build();
}
-void DEG_graph_build_for_compositor_preview(
- Depsgraph *graph, Main *bmain, Scene *scene, struct ViewLayer *view_layer, bNodeTree *nodetree)
+void DEG_graph_build_for_compositor_preview(Depsgraph *graph, bNodeTree *nodetree)
{
- deg::CompositorBuilderPipeline builder(graph, bmain, scene, view_layer, nodetree);
+ deg::CompositorBuilderPipeline builder(graph, nodetree);
builder.build();
}
-void DEG_graph_build_from_ids(Depsgraph *graph,
- Main *bmain,
- Scene *scene,
- ViewLayer *view_layer,
- ID **ids,
- const int num_ids)
+void DEG_graph_build_from_ids(Depsgraph *graph, ID **ids, const int num_ids)
{
- deg::FromIDsBuilderPipeline builder(
- graph, bmain, scene, view_layer, blender::Span(ids, num_ids));
+ deg::FromIDsBuilderPipeline builder(graph, blender::Span(ids, num_ids));
builder.build();
}
@@ -275,14 +259,14 @@ void DEG_graph_tag_relations_update(Depsgraph *graph)
}
/* Create or update relations in the specified graph. */
-void DEG_graph_relations_update(Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer)
+void DEG_graph_relations_update(Depsgraph *graph)
{
deg::Depsgraph *deg_graph = (deg::Depsgraph *)graph;
if (!deg_graph->need_update) {
/* Graph is up to date, nothing to do. */
return;
}
- DEG_graph_build_from_view_layer(graph, bmain, scene, view_layer);
+ DEG_graph_build_from_view_layer(graph);
}
/* Tag all relations for update. */
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc
index 0763738ff59..c5e306f3148 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.cc
+++ b/source/blender/depsgraph/intern/depsgraph_debug.cc
@@ -93,7 +93,7 @@ bool DEG_debug_graph_relations_validate(Depsgraph *graph,
{
Depsgraph *temp_depsgraph = DEG_graph_new(bmain, scene, view_layer, DEG_get_mode(graph));
bool valid = true;
- DEG_graph_build_from_view_layer(temp_depsgraph, bmain, scene, view_layer);
+ DEG_graph_build_from_view_layer(temp_depsgraph);
if (!DEG_debug_compare(temp_depsgraph, graph)) {
fprintf(stderr, "ERROR! Depsgraph wasn't tagged for update when it should have!\n");
BLI_assert(!"This should not happen!");
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 6d2577d5b78..b5364a71378 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -1302,7 +1302,7 @@ void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float
EEVEE_LightBake *lbake = (EEVEE_LightBake *)custom_data;
Depsgraph *depsgraph = lbake->depsgraph;
- DEG_graph_relations_update(depsgraph, lbake->bmain, lbake->scene, lbake->view_layer_input);
+ DEG_graph_relations_update(depsgraph);
DEG_evaluate_on_framechange(lbake->bmain, depsgraph, lbake->frame);
lbake->view_layer = DEG_get_evaluated_view_layer(depsgraph);
diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c
index eb3bdf43a3c..2a37302872a 100644
--- a/source/blender/editors/animation/anim_motion_paths.c
+++ b/source/blender/editors/animation/anim_motion_paths.c
@@ -91,7 +91,7 @@ Depsgraph *animviz_depsgraph_build(Main *bmain,
}
/* Build graph from all requested IDs. */
- DEG_graph_build_from_ids(depsgraph, bmain, scene, view_layer, ids, num_ids);
+ DEG_graph_build_from_ids(depsgraph, ids, num_ids);
MEM_freeN(ids);
/* Update once so we can access pointers of evaluated animation data. */
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index eb8b976320f..4d55aff1d1f 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -745,7 +745,7 @@ static int bake(Render *re,
/* We build a depsgraph for the baking,
* so we don't need to change the original data to adjust visibility and modifiers. */
Depsgraph *depsgraph = DEG_graph_new(bmain, scene, view_layer, DAG_EVAL_RENDER);
- DEG_graph_build_from_view_layer(depsgraph, bmain, scene, view_layer);
+ DEG_graph_build_from_view_layer(depsgraph);
int op_result = OPERATOR_CANCELLED;
bool ok = false;
diff --git a/source/blender/editors/scene/scene_edit.c b/source/blender/editors/scene/scene_edit.c
index fa63a890de7..d599c1cbcf0 100644
--- a/source/blender/editors/scene/scene_edit.c
+++ b/source/blender/editors/scene/scene_edit.c
@@ -119,7 +119,7 @@ void ED_scene_change_update(Main *bmain, Scene *scene, ViewLayer *layer)
Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, layer, true);
BKE_scene_set_background(bmain, scene);
- DEG_graph_relations_update(depsgraph, bmain, scene, layer);
+ DEG_graph_relations_update(depsgraph);
DEG_on_visible_update(bmain, false);
ED_render_engine_changed(bmain, false);
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index c88b6a1b297..5f5f6467c8a 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -207,8 +207,7 @@ static void compo_initjob(void *cjv)
ViewLayer *view_layer = cj->view_layer;
cj->compositor_depsgraph = DEG_graph_new(bmain, scene, view_layer, DAG_EVAL_RENDER);
- DEG_graph_build_for_compositor_preview(
- cj->compositor_depsgraph, bmain, scene, view_layer, cj->ntree);
+ DEG_graph_build_for_compositor_preview(cj->compositor_depsgraph, cj->ntree);
/* NOTE: Don't update animation to preserve unkeyed changes, this means can not use
* evaluate_on_framechange. */
diff --git a/source/blender/editors/transform/transform_convert_object.c b/source/blender/editors/transform/transform_convert_object.c
index 2e92b4e5c09..61af4ebbe46 100644
--- a/source/blender/editors/transform/transform_convert_object.c
+++ b/source/blender/editors/transform/transform_convert_object.c
@@ -357,7 +357,7 @@ static void set_trans_object_base_flags(TransInfo *t)
/* Makes sure base flags and object flags are identical. */
BKE_scene_base_flag_to_objects(t->view_layer);
/* Make sure depsgraph is here. */
- DEG_graph_relations_update(depsgraph, bmain, scene, view_layer);
+ DEG_graph_relations_update(depsgraph);
/* Clear all flags we need. It will be used to detect dependencies. */
trans_object_base_deps_flag_prepare(view_layer);
/* Traverse all bases and set all possible flags. */
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index 68b5b4baeca..4b2fd7b6735 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -869,8 +869,7 @@ Render *BlenderStrokeRenderer::RenderScene(Render * /*re*/, bool render)
#endif
Render *freestyle_render = RE_NewSceneRender(freestyle_scene);
- ViewLayer *view_layer = (ViewLayer *)freestyle_scene->view_layers.first;
- DEG_graph_relations_update(freestyle_depsgraph, freestyle_bmain, freestyle_scene, view_layer);
+ DEG_graph_relations_update(freestyle_depsgraph);
RE_RenderFreestyleStrokes(
freestyle_render, freestyle_bmain, freestyle_scene, render && get_stroke_count() > 0);
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc
index eeb13d31bd4..6412379c126 100644
--- a/source/blender/io/alembic/exporter/abc_export_capi.cc
+++ b/source/blender/io/alembic/exporter/abc_export_capi.cc
@@ -67,16 +67,13 @@ namespace io {
namespace alembic {
// Construct the depsgraph for exporting.
-static void build_depsgraph(Depsgraph *depsgraph, Main *bmain, const bool visible_objects_only)
+static void build_depsgraph(Depsgraph *depsgraph, const bool visible_objects_only)
{
- Scene *scene = DEG_get_input_scene(depsgraph);
- ViewLayer *view_layer = DEG_get_input_view_layer(depsgraph);
-
if (visible_objects_only) {
- DEG_graph_build_from_view_layer(depsgraph, bmain, scene, view_layer);
+ DEG_graph_build_from_view_layer(depsgraph);
}
else {
- DEG_graph_build_for_all_objects(depsgraph, bmain, scene, view_layer);
+ DEG_graph_build_for_all_objects(depsgraph);
}
}
@@ -97,7 +94,7 @@ static void export_startjob(void *customdata,
*progress = 0.0f;
*do_update = true;
- build_depsgraph(data->depsgraph, data->bmain, data->params.visible_objects_only);
+ build_depsgraph(data->depsgraph, data->params.visible_objects_only);
SubdivModifierDisabler subdiv_disabler(data->depsgraph);
if (!data->params.apply_subdiv) {
subdiv_disabler.disable_modifiers();
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc
index 57bc68d25bf..27196994a3c 100644
--- a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc
+++ b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc
@@ -328,8 +328,7 @@ class AbstractHierarchyIteratorInvisibleTest : public AbstractHierarchyIteratorT
{
depsgraph = DEG_graph_new(
bfile->main, bfile->curscene, bfile->cur_view_layer, depsgraph_evaluation_mode);
- DEG_graph_build_for_all_objects(
- depsgraph, bfile->main, bfile->curscene, bfile->cur_view_layer);
+ DEG_graph_build_for_all_objects(depsgraph);
BKE_scene_graph_update_tagged(depsgraph, bfile->main);
}
};
diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc
index 1c23535e248..83b8c18d436 100644
--- a/source/blender/io/usd/intern/usd_capi.cc
+++ b/source/blender/io/usd/intern/usd_capi.cc
@@ -75,12 +75,11 @@ static void export_startjob(void *customdata,
// Construct the depsgraph for exporting.
Scene *scene = DEG_get_input_scene(data->depsgraph);
- ViewLayer *view_layer = DEG_get_input_view_layer(data->depsgraph);
if (data->params.visible_objects_only) {
- DEG_graph_build_from_view_layer(data->depsgraph, data->bmain, scene, view_layer);
+ DEG_graph_build_from_view_layer(data->depsgraph);
}
else {
- DEG_graph_build_for_all_objects(data->depsgraph, data->bmain, scene, view_layer);
+ DEG_graph_build_for_all_objects(data->depsgraph);
}
BKE_scene_graph_update_tagged(data->depsgraph, data->bmain);
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c
index e3bf3bdc743..adab95d41a9 100644
--- a/source/blender/render/intern/source/external_engine.c
+++ b/source/blender/render/intern/source/external_engine.c
@@ -609,7 +609,7 @@ static void engine_depsgraph_init(RenderEngine *engine, ViewLayer *view_layer)
if (engine->re->r.scemode & R_BUTS_PREVIEW) {
Depsgraph *depsgraph = engine->depsgraph;
- DEG_graph_relations_update(depsgraph, bmain, scene, view_layer);
+ DEG_graph_relations_update(depsgraph);
DEG_evaluate_on_framechange(bmain, depsgraph, CFRA);
DEG_ids_check_recalc(bmain, depsgraph, scene, view_layer, true);
DEG_ids_clear_recalc(bmain, depsgraph);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 3236026c69f..8f5469c7a98 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -1977,7 +1977,7 @@ static void render_init_depsgraph(Render *re)
DEG_debug_name_set(re->pipeline_depsgraph, "RENDER PIPELINE");
/* Make sure there is a correct evaluated scene pointer. */
- DEG_graph_build_for_render_pipeline(re->pipeline_depsgraph, re->main, scene, view_layer);
+ DEG_graph_build_for_render_pipeline(re->pipeline_depsgraph);
/* Update immediately so we have proper evaluated scene. */
render_update_depsgraph(re);
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 1b991112f01..c363fdcc9d4 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -352,7 +352,7 @@ void wm_event_do_depsgraph(bContext *C, bool is_after_open_file)
*/
Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true);
if (is_after_open_file) {
- DEG_graph_relations_update(depsgraph, bmain, scene, view_layer);
+ DEG_graph_relations_update(depsgraph);
DEG_graph_on_visible_update(bmain, depsgraph, true);
}
DEG_make_active(depsgraph);