diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:19:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:19:58 +0400 |
commit | 0e2c8cdcdd13a49560e6f105de530c2ef94ed4e4 (patch) | |
tree | 0f53d799ec422ddc96dd948136061e08233abdf4 /source/blender/nodes/composite | |
parent | e0482b2def521df87f09c7aa23e58909f5e19b90 (diff) |
move image settings into their own structure so the interface can be shared where image saving settings are needed.
currently file out node and render output share this struct & UI.
Diffstat (limited to 'source/blender/nodes/composite')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_outputFile.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c index b2177002e82..7bdcad61625 100644 --- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c +++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c @@ -70,14 +70,14 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack * 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; + nif->im_format.flag |= R_IMF_FLAG_ZBUF; ibuf->zbuf_float= zbuf->rect; } } - BKE_makepicstring(string, nif->name, bmain->name, rd->cfra, nif->imtype, (rd->scemode & R_EXTENSION), TRUE); + BKE_makepicstring(string, nif->name, bmain->name, rd->cfra, nif->im_format.imtype, (rd->scemode & R_EXTENSION), TRUE); - if(0 == BKE_write_ibuf(ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality)) + if(0 == BKE_write_ibuf(ibuf, string, &nif->im_format)) printf("Cannot save Node File Output to %s\n", string); else printf("Saved: %s\n", string); @@ -100,9 +100,10 @@ static void node_composit_init_output_file(bNodeTree *UNUSED(ntree), bNode* node if(scene) { BLI_strncpy(nif->name, scene->r.pic, sizeof(nif->name)); - nif->imtype= scene->r.imtype; - nif->subimtype= scene->r.subimtype; - nif->quality= scene->r.quality; + nif->im_format= scene->r.im_format; + if (BKE_imtype_is_movie(nif->im_format.imtype)) { + nif->im_format.imtype= R_OPENEXR; + } nif->sfra= scene->r.sfra; nif->efra= scene->r.efra; } |