[Bf-blender-cvs] [06dc059f48d] blender2.8: Depsgraph: update frame in scene on frame change.

Brecht Van Lommel noreply at git.blender.org
Fri Sep 21 14:16:59 CEST 2018


Commit: 06dc059f48da7fdb4149c07ffd03aff6c9fa35a2
Author: Brecht Van Lommel
Date:   Fri Sep 21 14:09:07 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB06dc059f48da7fdb4149c07ffd03aff6c9fa35a2

Depsgraph: update frame in scene on frame change.

Normally the time can be read from DEG_get_ctime(depsgraph), but this is a
bit more forgiving for e.g. addons that don't care too much about the details
of the COW depsgraph.

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

M	source/blender/depsgraph/intern/depsgraph_eval.cc

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

diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index edb6600f3e0..5b6516509b0 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -63,6 +63,10 @@ void DEG_evaluate_on_refresh(Depsgraph *graph)
 	/* Update time on primary timesource. */
 	DEG::TimeSourceDepsNode *tsrc = deg_graph->find_time_source();
 	tsrc->cfra = deg_graph->ctime;
+	/* Update time in scene. */
+	if (deg_graph->scene_cow) {
+		BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->ctime);
+	}
 	DEG::deg_evaluate_on_refresh(deg_graph);
 }
 
@@ -78,6 +82,10 @@ void DEG_evaluate_on_framechange(Main *bmain,
 	tsrc->cfra = ctime;
 	tsrc->tag_update(deg_graph);
 	DEG::deg_graph_flush_updates(bmain, deg_graph);
+	/* Update time in scene. */
+	if (deg_graph->scene_cow) {
+		BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->ctime);
+	}
 	/* Perform recalculation updates. */
 	DEG::deg_evaluate_on_refresh(deg_graph);
 }



More information about the Bf-blender-cvs mailing list