[Bf-blender-cvs] [594384f] depsgraph_refactor: Depsgraph: Correction to previous commit

Sergey Sharybin noreply at git.blender.org
Wed Feb 25 16:46:03 CET 2015


Commit: 594384f2aa42326ee5e5887b6d82ce090ac608e2
Author: Sergey Sharybin
Date:   Wed Feb 25 20:45:27 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB594384f2aa42326ee5e5887b6d82ce090ac608e2

Depsgraph: Correction to previous commit

Update for the new frame happens a bit different and previous commit broke animation.

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

M	source/blender/blenkernel/intern/scene.c
M	source/blender/depsgraph/intern/depsgraph_eval.cpp

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

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index f7aa0b4..54c2695 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1825,13 +1825,13 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain,
 	for (sce_iter = sce; sce_iter; sce_iter = sce_iter->set)
 		DAG_scene_relations_update(bmain, sce_iter);
 
-	/* flush recalc flags to dependencies, if we were only changing a frame
-	 * this would not be necessary, but if a user or a script has modified
-	 * some datablock before BKE_scene_update_tagged was called, we need the flush */
-	DAG_ids_flush_tagged(bmain);
-
 #ifdef WITH_LEGACY_DEPSGRAPH
 	if (!use_new_eval) {
+		/* flush recalc flags to dependencies, if we were only changing a frame
+		 * this would not be necessary, but if a user or a script has modified
+		 * some datablock before BKE_scene_update_tagged was called, we need the flush */
+		DAG_ids_flush_tagged(bmain);
+
 		/* Following 2 functions are recursive
 		 * so don't call within 'scene_update_tagged_recursive' */
 		DAG_scene_update_flags(bmain, sce, lay, true, do_invisible_flush);   // only stuff that moves or needs display still
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cpp b/source/blender/depsgraph/intern/depsgraph_eval.cpp
index 5b57201..5604927 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cpp
@@ -372,6 +372,8 @@ void DEG_evaluate_on_framechange(EvaluationContext *eval_ctx,
 
 	tsrc->tag_update(graph);
 
+	DEG_graph_flush_updates(bmain, graph);
+
 	/* Perform recalculation updates. */
 	DEG_evaluate_on_refresh_ex(eval_ctx, bmain, graph, layers);
 }




More information about the Bf-blender-cvs mailing list