From 1693a5efe91999b60b3dc0bdff727473b3bd00bb Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 24 Jul 2019 12:40:33 +0200 Subject: Fix T66378: Missing animation update when switching view layer Current frame is stored in a scene, and scene might have multiple view layers. The inactive view layers were not informed about scene's frame being changed, so when user switched back to view after changing scene frame it was in an inconsistent state between current scene frame and animation. Now we tag scene for time changes, so dependency graph can catch up and do proper update. Currently tagging is from quite generic place. Probably better approach would be to tag from where frame is actually being assigned. Downside of this is that it's easy to miss some places. Reviewers: brecht, mont29 Reviewed By: brecht Maniphest Tasks: T66378 Differential Revision: https://developer.blender.org/D5332 --- source/blender/depsgraph/intern/depsgraph_eval.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to '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 6f3262174b4..f519fe76724 100644 --- a/source/blender/depsgraph/intern/depsgraph_eval.cc +++ b/source/blender/depsgraph/intern/depsgraph_eval.cc @@ -61,6 +61,7 @@ void DEG_evaluate_on_refresh(Depsgraph *graph) BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->ctime); } DEG::deg_evaluate_on_refresh(deg_graph); + deg_graph->need_update_time = false; } /* Frame-change happened for root scene that graph belongs to. */ @@ -79,6 +80,7 @@ void DEG_evaluate_on_framechange(Main *bmain, Depsgraph *graph, float ctime) } /* Perform recalculation updates. */ DEG::deg_evaluate_on_refresh(deg_graph); + deg_graph->need_update_time = false; } bool DEG_needs_eval(Depsgraph *graph) -- cgit v1.2.3