[Bf-blender-cvs] [31c2929496c] master: Depsgraph: Free user code from worry about updates flush

Sergey Sharybin noreply at git.blender.org
Thu Sep 5 12:01:14 CEST 2019


Commit: 31c2929496c2e778a162020215fb6d643d82581c
Author: Sergey Sharybin
Date:   Wed Sep 4 16:40:20 2019 +0200
Branches: master
https://developer.blender.org/rB31c2929496c2e778a162020215fb6d643d82581c

Depsgraph: Free user code from worry about updates flush

===================================================================

M	source/blender/blenkernel/intern/scene.c
M	source/blender/depsgraph/DEG_depsgraph.h
M	source/blender/depsgraph/intern/depsgraph_eval.cc
M	source/blender/depsgraph/intern/depsgraph_tag.cc
M	source/blender/editors/space_node/node_edit.c

===================================================================

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,



More information about the Bf-blender-cvs mailing list