On 09/10/2014 at 14:35, xxxxxxxx wrote:
When the interactive render region is used, I can simply use the same code as for a regular rendering and everything will work. In fact my own renderer copies the whole image back into the buffer, for example, 880x350 instead of the smaller render region, for example, 420x150. Cinema seems to only display the selected region, but that is somewhere inside C4D and has nothing to do with my code. I could of course optimize this processing and limit my computations to the selected region, but I don't care for that optimization for now.
The other part is the "Render region" (not the interactive one). Here we have another great example how funny C4D handles similar things completely different sometimes. When using the render region C4D does not "mask" the other parts of the buffer, so I would have to take care of the top, left, right and bottom and only copy the selected parts back. The interesting thing is that I am not even sure how I would tell C4D to only display/render the selected region. Whatever... here is some code I started with:
BaseContainer renderData = vps->render->GetRenderData();
Bool renderRegion = renderData.GetBool(RDATA_RENDERREGION, false);
if (renderRegion)
Int32 left = renderData.GetInt32(RDATA_RENDERREGION_LEFT);
If anyone knows how to handle render regions in an ideal way, please tell me. Otherwise, I just don't support that feature and instead of the render region, the whole image is updated/rendered.