[Bf-blender-cvs] [8b3ad25862e] master: Transform: Enable recursion dependency check for new depsgraph

Sergey Sharybin noreply at git.blender.org
Fri Sep 15 09:26:17 CEST 2017


Commit: 8b3ad25862e47fca9e4ec923f4e9157b278173ed
Author: Sergey Sharybin
Date:   Fri Sep 15 12:25:57 2017 +0500
Branches: master
https://developer.blender.org/rB8b3ad25862e47fca9e4ec923f4e9157b278173ed

Transform: Enable recursion dependency check for new depsgraph

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

M	source/blender/blenkernel/intern/depsgraph.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/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 019e0df1623..3ddf0f43d30 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2018,6 +2018,7 @@ void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, const sho
 	int lasttime;
 
 	if (!DEG_depsgraph_use_legacy()) {
+		DEG_scene_flush_update(bmain, sce);
 		return;
 	}
 
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index 945a4785b9c..59b10b95d49 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -134,6 +134,9 @@ void DEG_ids_clear_recalc(struct Main *bmain);
 /* Flush updates for all IDs */
 void DEG_ids_flush_tagged(struct Main *bmain);
 
+/* Flush updates for IDs in a single scene. */
+void DEG_scene_flush_update(struct Main *bmain, struct Scene *scene);
+
 /* 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 f73bb65e5dc..5adcb3a11b3 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -277,13 +277,18 @@ void DEG_ids_flush_tagged(Main *bmain)
 	     scene != NULL;
 	     scene = (Scene *)scene->id.next)
 	{
-		/* TODO(sergey): Only visible scenes? */
-		if (scene->depsgraph != NULL) {
-			DEG::deg_graph_flush_updates(
-			        bmain,
-			        reinterpret_cast<DEG::Depsgraph *>(scene->depsgraph));
-		}
+		DEG_scene_flush_update(bmain, scene);
+	}
+}
+
+void DEG_scene_flush_update(Main *bmain, Scene *scene)
+{
+	if (scene->depsgraph == NULL) {
+		return;
 	}
+	DEG::deg_graph_flush_updates(
+	        bmain,
+	        reinterpret_cast<DEG::Depsgraph *>(scene->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 521179fc1d9..ca49cde4b7a 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5606,9 +5606,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 */
-#ifdef WITH_LEGACY_DEPSGRAPH
 	DAG_scene_flush_update(G.main, t->scene, -1, 0);
-#endif
 
 	/* and we store them temporal in base (only used for transform code) */
 	/* this because after doing updates, the object->recalc is cleared */
@@ -5687,9 +5685,7 @@ static int count_proportional_objects(TransInfo *t)
 
 	/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
 	DAG_scene_relations_update(G.main, t->scene);
-#ifdef WITH_LEGACY_DEPSGRAPH
 	DAG_scene_flush_update(G.main, t->scene, -1, 0);
-#endif
 
 	/* 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