Fix T53874: OpenGL render to OpenEXR not working after recent changes.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 24 Jan 2018 10:03:03 +0000 (11:03 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 24 Jan 2018 10:07:06 +0000 (11:07 +0100)
Multilayer EXR also failed already in 2.79 for Sequencer and OpenGL rendering.
Now we revert to single layer OpenEXR in that case.

source/blender/render/intern/source/pipeline.c

index f5577ae89ea4963ed5b5817cdf8223794df20a0c..5a1a15d0266a5fcda4a55ac6b34f94d87427c2a1 100644 (file)
@@ -3334,11 +3334,14 @@ bool RE_WriteRenderViewsImage(ReportList *reports, RenderResult *rr, Scene *scen
                BLI_strncpy(filepath, name, sizeof(filepath));
 
                for (view_id = 0, rv = rr->views.first; rv; rv = rv->next, view_id++) {
+                       /* Sequencer and OpenGL render can't save multiple EXR layers. */
+                       bool is_float = rv->rect32 == NULL;
+
                        if (!is_mono) {
                                BKE_scene_multiview_view_filepath_get(&scene->r, filepath, rv->name, name);
                        }
 
-                       if (is_exr_rr) {
+                       if (is_exr_rr && is_float) {
                                ok = RE_WriteRenderResult(reports, rr, name, &rd->im_format, rv->name, -1);
                                render_print_save_message(reports, name, ok, errno);