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 <brecht@blender.org>2021-07-12 18:07:35 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-07-12 18:41:26 +0300
commita072e87e04ee583f899db4bd174e1804c97b3c9d (patch)
tree5f72600e66a908f65d8e26c85292800899327a4c /source/blender/depsgraph/intern/depsgraph_eval.cc
parent2ea565b0ec94136d01fb3ff5bdc31cecfe1c2440 (diff)
Fix T89040: dependency graph not handling time remapping correctly
In this bug report it resulted in rendering animations stopping too early, but this affected more areas. After the previous cleanup commit, it becomes clear that frame and ctime values were mixed up.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_eval.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_eval.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index de2d6d976c6..cc7ce871419 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -51,7 +51,7 @@ static void deg_flush_updates_and_refresh(deg::Depsgraph *deg_graph)
{
/* Update the time on the cow scene. */
if (deg_graph->scene_cow) {
- BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->ctime);
+ BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->frame);
}
deg::deg_graph_flush_updates(deg_graph);
@@ -63,10 +63,12 @@ void DEG_evaluate_on_refresh(Depsgraph *graph)
{
deg::Depsgraph *deg_graph = reinterpret_cast<deg::Depsgraph *>(graph);
const Scene *scene = DEG_get_input_scene(graph);
+ const float frame = BKE_scene_frame_get(scene);
const float ctime = BKE_scene_ctime_get(scene);
- if (ctime != deg_graph->ctime) {
+ if (deg_graph->frame != frame || ctime != deg_graph->ctime) {
deg_graph->tag_time_source();
+ deg_graph->frame = frame;
deg_graph->ctime = ctime;
}
@@ -74,10 +76,13 @@ void DEG_evaluate_on_refresh(Depsgraph *graph)
}
/* Frame-change happened for root scene that graph belongs to. */
-void DEG_evaluate_on_framechange(Depsgraph *graph, float ctime)
+void DEG_evaluate_on_framechange(Depsgraph *graph, float frame)
{
deg::Depsgraph *deg_graph = reinterpret_cast<deg::Depsgraph *>(graph);
+ const Scene *scene = DEG_get_input_scene(graph);
+
deg_graph->tag_time_source();
- deg_graph->ctime = ctime;
+ deg_graph->frame = frame;
+ deg_graph->ctime = BKE_scene_frame_to_ctime(scene, frame);
deg_flush_updates_and_refresh(deg_graph);
}