[Bf-blender-cvs] [4f3d9a09fe9] blender2.8: Depsgraph: Make depsgraph a part of evaluation context

Sergey Sharybin noreply at git.blender.org
Fri Oct 20 17:02:47 CEST 2017


Commit: 4f3d9a09fe9247e3ab1e62e1f998b78ceefaa9ba
Author: Sergey Sharybin
Date:   Fri Oct 20 16:50:58 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB4f3d9a09fe9247e3ab1e62e1f998b78ceefaa9ba

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.

===================================================================

M	source/blender/depsgraph/DEG_depsgraph.h
M	source/blender/depsgraph/intern/eval/deg_eval.cc

===================================================================

diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index 894adbee8c9..c7c5849c174 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -84,6 +84,7 @@ typedef struct EvaluationContext {
 	eEvaluationMode mode;
 	float ctime;
 
+	struct Depsgraph *depsgraph;
 	struct SceneLayer *scene_layer;
 	struct RenderEngineType *engine;
 } EvaluationContext;
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index 120785ac548..510e0e6ebbc 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -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;



More information about the Bf-blender-cvs mailing list