[Bf-blender-cvs] [70e844e] master: Fix T38353: some EXR files from other applications not loading correctly.
Brecht Van Lommel
noreply at git.blender.org
Sat Jan 25 17:47:19 CET 2014
Commit: 70e844ea11f3ed0c215bd667f668303ad55fd785
Author: Brecht Van Lommel
Date: Sat Jan 25 17:44:15 2014 +0100
https://developer.blender.org/rB70e844ea11f3ed0c215bd667f668303ad55fd785
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.
===================================================================
M source/blender/imbuf/intern/openexr/openexr_api.cpp
M source/blender/render/extern/include/RE_pipeline.h
===================================================================
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index b25a224..9fa6919 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;
}
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index 4c15ddd..32c0a1d 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -68,7 +68,7 @@ typedef struct Render Render;
typedef struct RenderPass {
struct RenderPass *next, *prev;
int passtype, channels;
- char name[16]; /* amount defined in openexr_multi.h */
+ char name[64]; /* amount defined in openexr_multi.h */
char chan_id[8]; /* amount defined in openexr_multi.h */
float *rect;
int rectx, recty;
More information about the Bf-blender-cvs
mailing list