diff options
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_eval.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_eval.cc | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc index ac92d440bbe..edb6600f3e0 100644 --- a/source/blender/depsgraph/intern/depsgraph_eval.cc +++ b/source/blender/depsgraph/intern/depsgraph_eval.cc @@ -55,76 +55,6 @@ extern "C" { #include "intern/depsgraph.h" -/* ****************** */ -/* Evaluation Context */ - -/* Create new evaluation context. */ -EvaluationContext *DEG_evaluation_context_new(eEvaluationMode mode) -{ - EvaluationContext *eval_ctx = - (EvaluationContext *)MEM_callocN(sizeof(EvaluationContext), - "EvaluationContext"); - DEG_evaluation_context_init(eval_ctx, mode); - return eval_ctx; -} - -/** - * Initialize evaluation context. - * Used by the areas which currently overrides the context or doesn't have - * access to a proper one. - */ -void DEG_evaluation_context_init(EvaluationContext *eval_ctx, - eEvaluationMode mode) -{ - eval_ctx->mode = mode; -} - -void DEG_evaluation_context_init_from_scene( - EvaluationContext *eval_ctx, - Scene *scene, - ViewLayer *view_layer, - eEvaluationMode mode) -{ - DEG_evaluation_context_init(eval_ctx, mode); - eval_ctx->depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); - eval_ctx->view_layer = view_layer; - eval_ctx->ctime = BKE_scene_frame_get(scene); -} - -void DEG_evaluation_context_init_from_view_layer_for_render( - EvaluationContext *eval_ctx, - Depsgraph *depsgraph, - Scene *scene, - ViewLayer *view_layer) -{ - /* ViewLayer may come from a copy of scene.viewlayers, we need to find the original though. */ - ViewLayer *view_layer_original = (ViewLayer *)BLI_findstring(&scene->view_layers, view_layer->name, offsetof(ViewLayer, name)); - BLI_assert(view_layer_original != NULL); - - DEG_evaluation_context_init(eval_ctx, DAG_EVAL_RENDER); - eval_ctx->ctime = BKE_scene_frame_get(scene); - eval_ctx->depsgraph = depsgraph; - eval_ctx->view_layer = view_layer_original; -} - -void DEG_evaluation_context_init_from_depsgraph( - EvaluationContext *eval_ctx, - Depsgraph *depsgraph, - eEvaluationMode mode) -{ - Scene *scene = DEG_get_evaluated_scene(depsgraph); - DEG_evaluation_context_init(eval_ctx, mode); - eval_ctx->ctime = (float)scene->r.cfra + scene->r.subframe; - eval_ctx->depsgraph = depsgraph; - eval_ctx->view_layer = DEG_get_evaluated_view_layer(depsgraph); -} - -/* Free evaluation context. */ -void DEG_evaluation_context_free(EvaluationContext *eval_ctx) -{ - MEM_freeN(eval_ctx); -} - /* Evaluate all nodes tagged for updating. */ void DEG_evaluate_on_refresh(Depsgraph *graph) { |