Fix T52280: The Image node in Compositing can't read Z buffer of openEXR in 2.79

As part of the fix for T51587, I removed the Depth output for non-Multilayer
images since it seemed weird that PNGs etc. that don't have a Z pass still get
a socket for it.
However, I forgot about non-multilayer EXRs, which are a special case that can
actually have a Z pass.

Therefore, this commit brings back the Depth output for non-multilayer images
just like it was in 2.78.
This commit is contained in:
Lukas Stockner 2017-08-08 23:00:02 +02:00 committed by Sergey Sharybin
parent 909320e3ff
commit e54df78c82
1 changed files with 3 additions and 0 deletions

View File

@ -178,6 +178,9 @@ static void cmp_node_image_create_outputs(bNodeTree *ntree, bNode *node, LinkNod
cmp_node_image_add_pass_output(ntree, node, "Alpha", RE_PASSNAME_COMBINED, -1, SOCK_FLOAT, false, available_sockets, &prev_index);
if (ima) {
if (!ima->rr) {
cmp_node_image_add_pass_output(ntree, node, RE_PASSNAME_Z, RE_PASSNAME_Z, -1, SOCK_FLOAT, false, available_sockets, &prev_index);
}
BKE_image_release_ibuf(ima, ibuf, NULL);
}
}