Issue was caused by Cycles using render options from rendering scene, not
from active scene.
For now solved by passing render resolution inside RenderEngine structure.
This probably could be solved in more general way, like adding bindings
for RenderEngine->Render, which would avoid passing options like
is_animation, came_override and so via RenderEngine. Would think about
this a bit more and probably would do that.
The same issue happens in trunk as well, but not consider such a change
trunk-ready, would want to make more tests and probably clean the code
a little bit before commiting this into trunk.
This fixes memory overflow caused by creating render result every time
RenderResult is creating when updating sample and not being freed until
tile is fully rendered.
Solved in probably not best way -- RenderResult is being stored in
RenderBuffers, so it's creating only once.
This solves memory issues, but while was looking into this issue
discovered dramatic slowdown caused by samples update in some files
from mango svn.
Solving this slowdown is becoming first priority from now on.
This applies to files when saving from image editor and when saving
render result.
Currently only works for images which has got float buffer and saving
happens to byte formats (such as PNG, JPEG). Also supports applying
color management for preview jpegs when main buffer is saving into
OpenEXR file.
As default transform when saving from image editor would be the same
settings as image editor uses itself.
Defaults for color correction of rendered images would be default
display name, no view transform and default values for gamma and
exposure.
save memory during render and cache render results.
Implementation notes:
In the render engine API it's now possible to get the render result for
one render layer only, and retrieve the expected tile size in case save
buffers is used. This is needed because EXR expects tiles with particular
size and coordinates.
The EXR temporary files are now also separated per layer, since Cycles
can't give the full render result for all render layers, and EXR doesn't
support writing parts of tiles.
In Cycles internally the handling of render buffers and multi GPU
rendering in particular changed quite a bit, and could use a bit more
refactoring to make things more consistent and simple.