Depsgraph: Make depsgraph a part of evaluation context

This way evaluation routines will know which exact depsgraph evaluation
is happening for.

Mainly needed to get evaluation flags associated with ID nodes.
This commit is contained in:
Sergey Sharybin 2017-10-20 16:50:58 +02:00
parent cdd1e86499
commit 4f3d9a09fe
2 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,7 @@ typedef struct EvaluationContext {
eEvaluationMode mode;
float ctime;
struct Depsgraph *depsgraph;
struct SceneLayer *scene_layer;
struct RenderEngineType *engine;
} EvaluationContext;

View File

@ -278,6 +278,7 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx,
/* Set time for the current graph evaluation context. */
TimeSourceDepsNode *time_src = graph->find_time_source();
eval_ctx->depsgraph = (::Depsgraph *)graph;
eval_ctx->scene_layer = DEG_get_evaluated_scene_layer((::Depsgraph *)graph);
eval_ctx->ctime = time_src->cfra;