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:
authorJacques Lucke <jacques@blender.org>2020-08-20 17:29:34 +0300
committerJacques Lucke <jacques@blender.org>2020-08-20 17:29:34 +0300
commit263148dbacc496b922a46397fd94e558e0d1e9ac (patch)
tree92edccf586ae09d858393362953429282a615c0a /source/blender/depsgraph/intern/depsgraph.cc
parent948e080fc5bb501f5fde183c3d5f52c3ca797190 (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/depsgraph.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc6
1 files changed, 5 insertions, 1 deletions
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);