diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-23 21:02:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-23 21:02:49 +0300 |
commit | a44b08a6c473c0aae9f98dc13f9d000e5ea639bc (patch) | |
tree | 6b70d6026827b5cf6eed3af1c56a38329c2497bf /source/blender/imbuf | |
parent | 0305fc30b3ba6a1b24e2c9c182ae2e76d553f341 (diff) | |
parent | 0aec2dcd3ae0ed382ffe7b3311a4e30fc88398e4 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 539b9fa45b4..4cb1c13a44a 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -1290,7 +1290,7 @@ static int imb_exr_split_channel_name(ExrChannel *echan, char *layname, char *pa return 1; } - /* last token is single character channel identifier */ + /* last token is channel identifier */ len = imb_exr_split_token(name, end, &token); if (len == 0) { printf("multilayer read: bad channel name: %s\n", name); @@ -1319,10 +1319,30 @@ static int imb_exr_split_channel_name(ExrChannel *echan, char *layname, char *pa ok = true; } } + else if (BLI_strcaseeq(token, "red")) { + echan->chan_id = 'R'; + ok = true; + } + else if (BLI_strcaseeq(token, "green")) { + echan->chan_id = 'G'; + ok = true; + } + else if (BLI_strcaseeq(token, "blue")) { + echan->chan_id = 'B'; + ok = true; + } + else if (BLI_strcaseeq(token, "alpha")) { + echan->chan_id = 'A'; + ok = true; + } + else if (BLI_strcaseeq(token, "depth")) { + echan->chan_id = 'Z'; + ok = true; + } if (ok == false) { BLI_strncpy(tokenbuf, token, std::min(len + 1, EXR_TOT_MAXNAME)); - printf("multilayer read: channel token too long: %s\n", tokenbuf); + printf("multilayer read: unknown channel token: %s\n", tokenbuf); return 0; } } |