diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-24 17:55:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-24 17:56:09 +0300 |
commit | 9560c57e0bed99a497f0390db6edd4ca7d852c56 (patch) | |
tree | 8372efca2ae3ff1864537342f90bedb788df08a2 /source/blender/render/intern | |
parent | bbc562fc69e1cb01d68877f002bb976881c08d3f (diff) |
Fix T53874: more cases of OpenGL render to OpenEXR not working after recent changes.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 8 | ||||
-rw-r--r-- | source/blender/render/intern/source/render_result.c | 13 |
2 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 5a1a15d0266..ed610b4e4b7 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -3316,7 +3316,8 @@ bool RE_WriteRenderViewsImage(ReportList *reports, RenderResult *rr, Scene *scen return false; bool is_mono = BLI_listbase_count_ex(&rr->views, 2) < 2; - bool is_exr_rr = ELEM(rd->im_format.imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER); + bool is_exr_rr = ELEM(rd->im_format.imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER) && + RE_HasFloatPixels(rr); if (rd->im_format.views_format == R_IMF_VIEWS_MULTIVIEW && is_exr_rr) { @@ -3334,14 +3335,11 @@ 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 && is_float) { + if (is_exr_rr) { ok = RE_WriteRenderResult(reports, rr, name, &rd->im_format, rv->name, -1); render_print_save_message(reports, name, ok, errno); diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index 6dc3457d52e..0499577726c 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -1421,6 +1421,19 @@ bool RE_HasCombinedLayer(RenderResult *res) return (rv->rect32 || rv->rectf); } +bool RE_HasFloatPixels(RenderResult *res) +{ + RenderView *rview; + + for (rview = res->views.first; rview; rview = rview->next) { + if (rview->rect32 && !rview->rectf) { + return false; + } + } + + return true; +} + bool RE_RenderResult_is_stereo(RenderResult *res) { if (! BLI_findstring(&res->views, STEREO_LEFT_NAME, offsetof(RenderView, name))) |