Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2015-10-28 18:41:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-29 13:10:17 +0300
commitc2337748e59d2027459513f789e9bf0b93d5d018 (patch)
tree766a52c38ef7823e3def2845a74f66e605048a7b
parentf30a270a7058d41f758db889028ab23d230a4a0b (diff)
Fix T46617 File Output Node seems to save only black images into OpenEXR image data
If the node output had only one layer, it would be detected as singlelayer, and it would miss the blender exr header string
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index e3c02736755..c3fb43b44af 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1806,8 +1806,15 @@ static void imb_exr_type_by_channels(ChannelList& channels, StringVector& views,
/* will not include empty layer names */
channels.layers(layerNames);
- if (views.size() && views[0] != "")
+ if (views.size() && views[0] != "") {
*r_multiview = true;
+ }
+ else {
+ *r_singlelayer = false;
+ *r_multilayer = true;
+ *r_multiview = false;
+ return;
+ }
if (layerNames.size()) {
/* if layerNames is not empty, it means at least one layer is non-empty,
@@ -1824,7 +1831,7 @@ static void imb_exr_type_by_channels(ChannelList& channels, StringVector& views,
std::string layerName = *i;
size_t pos = layerName.rfind ('.');
- if (pos != std::string::npos) {
+ if (pos == std::string::npos) {
*r_multilayer = true;
*r_singlelayer = false;
return;