diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 3f0b213efac..698d67478d8 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -306,9 +306,20 @@ Mesh *rna_Main_meshes_new_from_object( { EvaluationContext eval_ctx; + /* XXX: This should never happen, but render pipeline is not ready to give + * proper scene_layer, and will always pass NULL here. For until we port + * pipeline form SceneRenderLayer to SceneLayer we have this stub to prevent + * some obvious crashes. + * - sergey - + */ + if (scene_layer == NULL) { + scene_layer = sce->render_layers.first; + } + DEG_evaluation_context_init(&eval_ctx, settings); eval_ctx.ctime = (float)sce->r.cfra + sce->r.subframe; eval_ctx.scene_layer = scene_layer; + eval_ctx.depsgraph = BKE_scene_get_depsgraph(sce, scene_layer, false); switch (ob->type) { case OB_FONT: |