[Bf-blender-cvs] [1829084da1a] blender2.8: Depsgraph: Switch to explicit graph specification for tag flush

Sergey Sharybin noreply at git.blender.org
Tue Oct 24 16:04:28 CEST 2017


Commit: 1829084da1a47e6080d4b85c2eb94fd2c0b07c27
Author: Sergey Sharybin
Date:   Tue Oct 24 15:25:41 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB1829084da1a47e6080d4b85c2eb94fd2c0b07c27

Depsgraph: Switch to explicit graph specification for tag flush

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

M	source/blender/blenkernel/intern/scene.c
M	source/blender/depsgraph/DEG_depsgraph.h
M	source/blender/depsgraph/intern/depsgraph_tag.cc
M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 8b53425d343..4662612cc24 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1608,7 +1608,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc
 	prepare_mesh_for_viewport_render(bmain, scene);
 
 	/* flush recalc flags to dependencies */
-	DEG_scene_flush_update(bmain, scene);
+	DEG_graph_flush_update(bmain, scene->depsgraph_legacy);
 
 	/* removed calls to quick_cache, see pointcache.c */
 	
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index 34e59966a71..17cf22ae1b4 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -181,7 +181,7 @@ void DEG_ids_clear_recalc(struct Main *bmain);
 /* Update Flushing ------------------------------- */
 
 /* Flush updates for IDs in a single scene. */
-void DEG_scene_flush_update(struct Main *bmain, struct Scene *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_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index cde87ba126c..8339a765956 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -431,12 +431,12 @@ void DEG_id_type_tag(Main *bmain, short id_type)
 	bmain->id_tag_update[BKE_idcode_to_index(id_type)] = 1;
 }
 
-void DEG_scene_flush_update(Main *bmain, Scene *scene)
+void DEG_graph_flush_update(Main *bmain, Depsgraph *depsgraph)
 {
-	if (scene->depsgraph_legacy == NULL) {
+	if (depsgraph == NULL) {
 		return;
 	}
-	DEG::deg_graph_flush_updates(bmain, (DEG::Depsgraph *)scene->depsgraph_legacy);
+	DEG::deg_graph_flush_updates(bmain, (DEG::Depsgraph *)depsgraph);
 }
 
 /* Update dependency graph when visible scenes/layers changes. */
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index b04767724ea..7a41272332f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5603,7 +5603,7 @@ static void set_trans_object_base_flags(TransInfo *t)
 	}
 
 	/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
-	DEG_scene_flush_update(G.main, t->scene);
+	DEG_graph_flush_update(G.main, t->scene->depsgraph_legacy);
 
 	/* and we store them temporal in base (only used for transform code) */
 	/* this because after doing updates, the object->recalc is cleared */
@@ -5683,7 +5683,7 @@ static int count_proportional_objects(TransInfo *t)
 
 	/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
 	DEG_scene_relations_update(G.main, t->scene);
-	DEG_scene_flush_update(G.main, t->scene);
+	DEG_graph_flush_update(G.main, t->scene->depsgraph_legacy);
 
 	/* and we store them temporal in base (only used for transform code) */
 	/* this because after doing updates, the object->recalc is cleared */



More information about the Bf-blender-cvs mailing list