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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-03-10 06:33:14 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-03-10 08:27:19 +0300
commit50dde3d01ac5076cf42a0523d9eab4aac917a990 (patch)
tree2aef168487f24bd9b434ffca05294a58f88b65a2 /source/blender/imbuf/intern/openexr
parentd526b35ce282b97bef99844f405e802788a2d399 (diff)
Fix T54269: saved EXR file files unreadable some editors in Blender.
Don't write the multichannel metadata when there is only a single layer, and don't unnecessarily consider single layer images with Blender metadata as multi layer.
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 4cb1c13a44a..4e85d70d382 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1621,14 +1621,13 @@ static bool exr_has_alpha(MultiPartInputFile& file)
static bool imb_exr_is_multilayer_file(MultiPartInputFile& file)
{
- const StringAttribute *comments = file.header(0).findTypedAttribute<StringAttribute>("BlenderMultiChannel");
const ChannelList& channels = file.header(0).channels();
std::set <std::string> layerNames;
/* will not include empty layer names */
channels.layers(layerNames);
- if (comments || layerNames.size() > 1)
+ if (layerNames.size() > 1)
return true;
if (layerNames.size()) {
@@ -1667,7 +1666,7 @@ static void imb_exr_type_by_channels(ChannelList& channels, StringVector& views,
}
else {
*r_singlelayer = false;
- *r_multilayer = true;
+ *r_multilayer = (layerNames.size() > 1);
*r_multiview = false;
return;
}