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 <brechtvanlommel@gmail.com>2018-04-06 10:17:53 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-13 15:17:22 +0300
commit340bfdef2e424c59e85785c1660db805b3255882 (patch)
treed4677eef333ecd0d9d07e8d87b7d31aa254bf02d /source/blender/depsgraph/intern/depsgraph_eval.cc
parent5d7952d9c75d087b551ab95dff90ee2f7f636417 (diff)
Depsgraph: store mode and time in depsgraph, add view layer / scene accessors.
Scene, view layer and mode are now set in the constructor and never changed. Time is updated on frame changes to indicate which frame is being or has been evaluated last. This is a step towards making EvaluationContext obsolete. Differential Revision: https://developer.blender.org/D3144
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_eval.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_eval.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index 0b3e4fd8db9..d50e55e4cfb 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -134,9 +134,10 @@ void DEG_evaluate_on_refresh(EvaluationContext *eval_ctx,
Depsgraph *graph)
{
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
+ deg_graph->ctime = BKE_scene_frame_get(deg_graph->scene);
/* Update time on primary timesource. */
DEG::TimeSourceDepsNode *tsrc = deg_graph->find_time_source();
- tsrc->cfra = BKE_scene_frame_get(deg_graph->scene);
+ tsrc->cfra = deg_graph->ctime;
DEG::deg_evaluate_on_refresh(eval_ctx, deg_graph);
}
@@ -147,6 +148,7 @@ void DEG_evaluate_on_framechange(EvaluationContext *eval_ctx,
float ctime)
{
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
+ deg_graph->ctime = ctime;
/* Update time on primary timesource. */
DEG::TimeSourceDepsNode *tsrc = deg_graph->find_time_source();
tsrc->cfra = ctime;