Rename any instance of scene layer or render layer in code with view layer
[blender.git] / source / blender / depsgraph / intern / depsgraph_eval.cc
index 820be5179b591a669d545a4a691aff20f0250c7a..31332b416d58493639e54eed0fb6c961bcd6530f 100644 (file)
@@ -80,15 +80,16 @@ void DEG_evaluation_context_init(EvaluationContext *eval_ctx,
 
 void DEG_evaluation_context_init_from_scene(EvaluationContext *eval_ctx,
                                             Scene *scene,
-                                            SceneLayer *scene_layer,
+                                            ViewLayer *view_layer,
                                             RenderEngineType *engine,
                                             eEvaluationMode mode)
 {
        DEG_evaluation_context_init(eval_ctx, mode);
-       eval_ctx->depsgraph = BKE_scene_get_depsgraph(scene, scene_layer);
-       eval_ctx->scene_layer = scene_layer;
+       eval_ctx->depsgraph = BKE_scene_get_depsgraph(scene, view_layer, false);
+       eval_ctx->view_layer = view_layer;
        eval_ctx->engine = engine;
        eval_ctx->ctime = BKE_scene_frame_get(scene);
+       BLI_assert(eval_ctx->depsgraph != NULL);
 }
 
 /* Free evaluation context. */