Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-21 15:09:07 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-21 15:15:27 +0300
commit06dc059f48da7fdb4149c07ffd03aff6c9fa35a2 (patch)
tree0f1093d139e33e983eaac24c24fc797e77a3e63a /source/blender/depsgraph/intern/depsgraph_eval.cc
parent4494be513ac455b106b2cb9be119136a58212cd1 (diff)
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.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_eval.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_eval.cc8
1 files changed, 8 insertions, 0 deletions
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);
}