Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_eval.cc
| Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
| void DEG_evaluation_context_init(EvaluationContext *eval_ctx, | void DEG_evaluation_context_init(EvaluationContext *eval_ctx, | ||||
| eEvaluationMode mode) | eEvaluationMode mode) | ||||
| { | { | ||||
| eval_ctx->mode = mode; | eval_ctx->mode = mode; | ||||
| } | } | ||||
| void DEG_evaluation_context_init_from_scene(EvaluationContext *eval_ctx, | void DEG_evaluation_context_init_from_scene(EvaluationContext *eval_ctx, | ||||
| Scene *scene, | Scene *scene, | ||||
| SceneLayer *scene_layer, | ViewLayer *view_layer, | ||||
| RenderEngineType *engine, | RenderEngineType *engine, | ||||
| eEvaluationMode mode) | eEvaluationMode mode) | ||||
| { | { | ||||
| DEG_evaluation_context_init(eval_ctx, mode); | DEG_evaluation_context_init(eval_ctx, mode); | ||||
| eval_ctx->depsgraph = BKE_scene_get_depsgraph(scene, scene_layer, false); | eval_ctx->depsgraph = BKE_scene_get_depsgraph(scene, view_layer, false); | ||||
| eval_ctx->scene_layer = scene_layer; | eval_ctx->view_layer = view_layer; | ||||
| eval_ctx->engine = engine; | eval_ctx->engine = engine; | ||||
| eval_ctx->ctime = BKE_scene_frame_get(scene); | eval_ctx->ctime = BKE_scene_frame_get(scene); | ||||
| BLI_assert(eval_ctx->depsgraph != NULL); | BLI_assert(eval_ctx->depsgraph != NULL); | ||||
| } | } | ||||
| /* Free evaluation context. */ | /* Free evaluation context. */ | ||||
| void DEG_evaluation_context_free(EvaluationContext *eval_ctx) | void DEG_evaluation_context_free(EvaluationContext *eval_ctx) | ||||
| { | { | ||||
| Show All 35 Lines | |||||