diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-03-01 12:47:32 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-03-01 12:47:32 +0400 |
commit | 537605f0d4d23738df33ffba81605d3a5bd74ad1 (patch) | |
tree | f2f5c7c9793da48b30e7a4a94c7dfa7e15a94f16 /source/blender | |
parent | 77442de6c0a36c7368a48162ae48168709a1b06d (diff) |
Fix for wrong channel number in ImBuf when file node output format is something other than RGBA. This doesn't get set in the init function, has to be done manually (i guess?).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_outputFile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c index 90aa03997c1..50b49fcff68 100644 --- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c +++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c @@ -163,6 +163,12 @@ static void exec_output_file_singlelayer(RenderData *rd, bNode *node, bNodeStack } ibuf = IMB_allocImBuf(cbuf->x, cbuf->y, format->planes, 0); + /* XXX have to set this explicitly it seems */ + switch (format->planes) { + case R_IMF_PLANES_BW: ibuf->channels = 1; break; + case R_IMF_PLANES_RGB: ibuf->channels = 3; break; + case R_IMF_PLANES_RGBA: ibuf->channels = 4; break; + } ibuf->rect_float = cbuf->rect; ibuf->dither = rd->dither_intensity; |