Fix multi layer/multi pass render
authorDalai Felinto <dfelinto@gmail.com>
Wed, 22 Nov 2017 12:33:26 +0000 (10:33 -0200)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 22 Nov 2017 12:34:19 +0000 (10:34 -0200)
But introduced on the SceneRenderLayer > RenderLayer commit:
3a95bdfc65d883e7db006f

Reported by Sergey Sharybin (over irc).

source/blender/editors/render/render_internal.c

index 701227091b3e06fa1c5ce0c131390d58cf3936de..8119e88eeaa2c3ffdc20dc1db0fc3bf423db57ac 100644 (file)
@@ -308,9 +308,6 @@ static int screen_render_exec(bContext *C, wmOperator *op)
 
        /* custom scene and single layer re-render */
        screen_render_scene_layer_set(op, mainp, &scene, &scene_layer);
-       if (scene_layer == NULL) {
-               scene_layer = CTX_data_scene_layer(C);
-       }
 
        if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
                BKE_report(op->reports, RPT_ERROR, "Cannot write a single file with an animation format selected");
@@ -914,9 +911,6 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
        
        /* custom scene and single layer re-render */
        screen_render_scene_layer_set(op, mainp, &scene, &scene_layer);
-       if (scene_layer == NULL) {
-               scene_layer = CTX_data_scene_layer(C);
-       }
 
        if (RNA_struct_property_is_set(op->ptr, "layer"))
                jobflag |= WM_JOB_SUSPEND;