From 263148dbacc496b922a46397fd94e558e0d1e9ac Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 20 Aug 2020 16:29:34 +0200 Subject: 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 --- source/blender/depsgraph/intern/depsgraph.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/depsgraph/intern/depsgraph.cc') diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index 4a9c840dd9f..c0feab2262a 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -63,7 +63,6 @@ namespace deg { Depsgraph::Depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode) : time_source(nullptr), need_update(true), - need_update_time(false), bmain(bmain), scene(scene), view_layer(view_layer), @@ -103,6 +102,11 @@ TimeSourceNode *Depsgraph::find_time_source() const return time_source; } +void Depsgraph::tag_time_source() +{ + time_source->tag_update(this, DEG_UPDATE_SOURCE_TIME); +} + IDNode *Depsgraph::find_id_node(const ID *id) const { return id_hash.lookup_default(id, nullptr); -- cgit v1.2.3