diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-15 00:29:42 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-15 00:29:42 +0300 |
commit | ea9866a75f9e7f348364617b866cd2e6f057e458 (patch) | |
tree | 8ede0ba1858980cb90409127c6cf8b90c07fcddf /source/blender/imbuf | |
parent | afc8dec9218ad0f85dd5c32475d09dfde74723b5 (diff) |
Memory saving for large renders:
New option "Save Buffers", in first Output panel of renderbuttons, will not
allocate all render buffers, but instead save the rendered tiles to exr.
For each scene rendered, a single exr file then is created.
After rendering, the files get read, and only then the memory allocation is
done.
The exr files are saved in the temp dir (from user settings), and have
names derived from the filename+scene name. That way these buffers remain
relatively unique, and can be re-used later too.
Saving all render-layers and passes in a single file (as F3 command) will
be done later. Also reading back the current muli-layer exr files is not
supported yet (will read black). The purpose is that these files then can
be used as input for the Compositor.
One fun thing I added; after rendering once with this option, close
Blender, and restart it. If you have a Composite set up press 'R' on an
active RenderResult node. This will refresh the node(s) and load the exr,
so you can composite again without a re-render.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 4b5cf64cd49..6883cc4051d 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -429,18 +429,20 @@ int IMB_exr_begin_read(void *handle, char *filename, int *width, int *height) { ExrHandle *data= (ExrHandle *)handle; - data->ifile = new InputFile(filename); - if(data->ifile) { - Box2i dw = data->ifile->header().dataWindow(); - data->width= *width = dw.max.x - dw.min.x + 1; - data->height= *height = dw.max.y - dw.min.y + 1; - - const ChannelList &channels = data->ifile->header().channels(); - - for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) - IMB_exr_add_channel(data, NULL, i.name()); - - return 1; + if(BLI_exists(filename)) { + data->ifile = new InputFile(filename); + if(data->ifile) { + Box2i dw = data->ifile->header().dataWindow(); + data->width= *width = dw.max.x - dw.min.x + 1; + data->height= *height = dw.max.y - dw.min.y + 1; + + const ChannelList &channels = data->ifile->header().channels(); + + for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) + IMB_exr_add_channel(data, NULL, i.name()); + + return 1; + } } return 0; } |