Initialize scene layer for evaluation context used by preview renderer

Ideally need to clean and sane and impossible-to-break way of making sure
evaluation context is fully initialized, but that would need some thoughts
and experimentation.
This commit is contained in:
Sergey Sharybin
2017-07-24 15:00:44 +02:00
parent bbb1c0a077
commit b7fbe6ae5d

View File

@@ -3820,6 +3820,7 @@ void RE_PreviewRender(Render *re, Main *bmain, Scene *sce)
re->scene_color_manage = BKE_scene_check_color_management_enabled(sce);
re->lay = sce->lay;
re->depsgraph = BKE_scene_get_depsgraph(sce, scene_layer);
re->eval_ctx->scene_layer = scene_layer;
camera = RE_GetCamera(re);
RE_SetCamera(re, camera);