Small fix in Composite "File Output" node: added Z buffer input socket,

for saving rgba+z exr files.
This commit is contained in:
Ton Roosendaal 2006-11-18 11:11:55 +00:00
parent 2a0fc46266
commit e76a1c120f

@ -771,6 +771,7 @@ static bNodeType cmp_node_composite= {
/* **************** OUTPUT FILE ******************** */
static bNodeSocketType cmp_node_output_file_in[]= {
{ SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Z", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@ -792,6 +793,13 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack *
ibuf->rect_float= cbuf->rect;
ibuf->dither= rd->dither_intensity;
if(in[1]->data) {
CompBuf *zbuf= in[1]->data;
if(zbuf->type==CB_VAL && zbuf->x==cbuf->x && zbuf->y==cbuf->y) {
nif->subimtype|= R_OPENEXR_ZBUF;
ibuf->zbuf_float= zbuf->rect;
}
}
BKE_makepicstring(string, nif->name, rd->cfra, nif->imtype);