diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-06 10:17:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-13 15:17:22 +0300 |
commit | 340bfdef2e424c59e85785c1660db805b3255882 (patch) | |
tree | d4677eef333ecd0d9d07e8d87b7d31aa254bf02d /source/blender/depsgraph/intern/depsgraph.h | |
parent | 5d7952d9c75d087b551ab95dff90ee2f7f636417 (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.h')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h index 985991e91e3..9fa6b38166d 100644 --- a/source/blender/depsgraph/intern/depsgraph.h +++ b/source/blender/depsgraph/intern/depsgraph.h @@ -38,6 +38,8 @@ #include "BLI_threads.h" /* for SpinLock */ +#include "DEG_depsgraph.h" + #include "intern/depsgraph_types.h" struct ID; @@ -100,7 +102,9 @@ struct Depsgraph { typedef vector<OperationDepsNode *> OperationNodes; typedef vector<IDDepsNode *> IDDepsNodes; - Depsgraph(); + Depsgraph(Scene *scene, + ViewLayer *view_layer, + eEvaluationMode mode); ~Depsgraph(); /** @@ -187,9 +191,13 @@ struct Depsgraph { */ SpinLock lock; - /* Scene and layer this dependency graph is built for. */ + /* Scene, layer, mode this dependency graph is built for. */ Scene *scene; ViewLayer *view_layer; + eEvaluationMode mode; + + /* Time at which dependency graph is being or was last evaluated. */ + float ctime; }; } // namespace DEG |