diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-04 17:40:20 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-05 12:57:20 +0300 |
commit | 31c2929496c2e778a162020215fb6d643d82581c (patch) | |
tree | cfc2b2a16d7024084afcebdf24cf926b95541b0f /source/blender | |
parent | ac060232aae2e70ff83c6926420a38f037bdee02 (diff) |
Depsgraph: Free user code from worry about updates flush
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 2 | ||||
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph.h | 5 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_eval.cc | 3 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 8 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 1 |
5 files changed, 2 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index f26688515a1..36d0cfe9ac4 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1566,8 +1566,6 @@ static void scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain, bool on // DEG_debug_graph_relations_validate(depsgraph, bmain, scene); /* Flush editing data if needed. */ prepare_mesh_for_viewport_render(bmain, view_layer); - /* Flush recalc flags to dependencies. */ - DEG_graph_flush_update(bmain, depsgraph); /* Update all objects: drivers, matrices, displists, etc. flags set * by depgraph or manual, no layer check here, gets correct flushed. */ diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h index 8e940ab1152..d4518729d99 100644 --- a/source/blender/depsgraph/DEG_depsgraph.h +++ b/source/blender/depsgraph/DEG_depsgraph.h @@ -128,11 +128,6 @@ void DEG_id_type_tag(struct Main *bmain, short id_type); void DEG_ids_clear_recalc(struct Main *bmain, Depsgraph *depsgraph); -/* Update Flushing ------------------------------- */ - -/* Flush updates for IDs in a single scene. */ -void DEG_graph_flush_update(struct Main *bmain, Depsgraph *depsgraph); - /* Check if something was changed in the database and inform * editors about this. */ diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc index d53d66aa55e..b2b7d2a9d00 100644 --- a/source/blender/depsgraph/intern/depsgraph_eval.cc +++ b/source/blender/depsgraph/intern/depsgraph_eval.cc @@ -49,7 +49,7 @@ extern "C" { #include "intern/depsgraph.h" /* Evaluate all nodes tagged for updating. */ -void DEG_evaluate_on_refresh(Main * /*bmain*/, Depsgraph *graph) +void DEG_evaluate_on_refresh(Main *bmain, Depsgraph *graph) { DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph); deg_graph->ctime = BKE_scene_frame_get(deg_graph->scene); @@ -60,6 +60,7 @@ void DEG_evaluate_on_refresh(Main * /*bmain*/, Depsgraph *graph) if (deg_graph->scene_cow) { BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->ctime); } + DEG::deg_graph_flush_updates(bmain, deg_graph); DEG::deg_evaluate_on_refresh(deg_graph); deg_graph->need_update_time = false; } diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 72ef495f1d5..647837bd758 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -779,14 +779,6 @@ void DEG_id_type_tag(Main *bmain, short id_type) } } -void DEG_graph_flush_update(Main *bmain, Depsgraph *depsgraph) -{ - if (depsgraph == NULL) { - return; - } - DEG::deg_graph_flush_updates(bmain, (DEG::Depsgraph *)depsgraph); -} - /* Update dependency graph when visible scenes/layers changes. */ void DEG_graph_on_visible_update(Main *bmain, Depsgraph *depsgraph, const bool do_time) { diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index c5553a105fb..2b0627251cd 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -210,7 +210,6 @@ static void compo_initjob(void *cjv) /* NOTE: Don't update animation to preserve unkeyed changes, this means can not use * evaluate_on_framechange. */ - DEG_graph_flush_update(bmain, cj->compositor_depsgraph); DEG_evaluate_on_refresh(bmain, cj->compositor_depsgraph); bNodeTree *ntree_eval = (bNodeTree *)DEG_get_evaluated_id(cj->compositor_depsgraph, |