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>2014-01-25 20:44:15 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-01-25 20:44:15 +0400
commit70e844ea11f3ed0c215bd667f668303ad55fd785 (patch)
tree3deb6697afd328ce6b30ff2196244a6e7f3e4c44 /source/blender/imbuf
parentb46dcafa7aeef69389ce5f45fb7982a37191534c (diff)
Fix T38353: some EXR files from other applications not loading correctly.
* EXR layers with names like 'Z' without any pass name were not loaded at all and would break the Combined pass as well. * EXR pass names longer than 16 characters where writing past the end of the array and getting invalid names.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index b25a224e16c..9fa69194ded 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -891,7 +891,14 @@ static int imb_exr_split_channel_name(ExrChannel *echan, char *layname, char *pa
if (name[1] == 0) {
echan->chan_id = name[0];
layname[0] = '\0';
- strcpy(passname, "Combined");
+
+ if (ELEM4(name[0], 'R', 'G', 'B', 'A'))
+ strcpy(passname, "Combined");
+ else if (name[0] == 'Z')
+ strcpy(passname, "Depth");
+ else
+ strcpy(passname, name);
+
return 1;
}