From e76a1c120f4083697b84f5c4f69e4e7668b2bbb6 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 18 Nov 2006 11:11:55 +0000 Subject: [PATCH] Small fix in Composite "File Output" node: added Z buffer input socket, for saving rgba+z exr files. --- source/blender/blenkernel/intern/node_composite.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/blender/blenkernel/intern/node_composite.c b/source/blender/blenkernel/intern/node_composite.c index 9d022f9d924..5164da86c7d 100644 --- a/source/blender/blenkernel/intern/node_composite.c +++ b/source/blender/blenkernel/intern/node_composite.c @@ -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);