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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user