diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-20 17:29:34 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-20 17:29:34 +0300 |
commit | 263148dbacc496b922a46397fd94e558e0d1e9ac (patch) | |
tree | 92edccf586ae09d858393362953429282a615c0a /source/blender/depsgraph/intern/eval/deg_eval_flush.cc | |
parent | 948e080fc5bb501f5fde183c3d5f52c3ca797190 (diff) |
Depsgraph: refactor tagging after time changes
This reverts {rB1693a5efe91999b60b3dc0bdff727473b3bd00bb}
and implements an alternative solution.
The old patch had the problem that the depsgraph would always
evaluate at the current frame of the original scene (even when
`DEG_evaluate_on_framechange` was used). Now it is possible
to evaluate the depsgraph at a specific frame without having to
change the original scene.
Reviewers: sergey, sybren
Differential Revision: https://developer.blender.org/D8616
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval_flush.cc')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_flush.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc index dea23c9f96d..5ccdcbec858 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc @@ -357,14 +357,9 @@ void deg_graph_flush_updates(Depsgraph *graph) BLI_assert(graph != nullptr); Main *bmain = graph->bmain; + graph->time_source->flush_update_tag(graph); + /* Nothing to update, early out. */ - if (graph->need_update_time) { - const Scene *scene_orig = graph->scene; - const float ctime = BKE_scene_frame_get(scene_orig); - TimeSourceNode *time_source = graph->find_time_source(); - graph->ctime = ctime; - time_source->tag_update(graph, DEG_UPDATE_SOURCE_TIME); - } if (graph->entry_tags.is_empty()) { return; } @@ -412,6 +407,8 @@ void deg_graph_clear_tags(Depsgraph *graph) } /* Clear any entry tags which haven't been flushed. */ graph->entry_tags.clear(); + + graph->time_source->tagged_for_update = false; } } // namespace deg |