On 02/05/2014 at 17:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 14+
Platform: Windows ;
Language(s) : C++ ;
---------
Hello;
I can't quite figure out how to access the Interactive Render Region programmatically. Currently, I'm just trying to refresh the IRR after a view change. I set the camera, then call DrawViews(), works all fine...
...but even with DRAWFLAGS_FORCEFULLREDRAW, the IRR just switches black, and I don't see a DRAWFLAG that specifically addresses the IRR.
So, I assume that DrawViews() does not automatically refresh the IRR. But what is the correct method?
StartEditorRender() does render something into the BaseDraw, but has no flags to set that would tell the renderer to use the IRR.
Manually using the IRR settings with StartEditorRender() does not really work for me, since I can't read the IRR data (at least activation and window coordinates would be required, but I am aware that the IRR has further settings for which StartEditorRender() doesn't even have a plug).
RenderDocument() seems a better choice, since its render flags at least offer a RENDERFLAGS_IRR value. This is a heavyweight function however which requires cloning the document, using the active render data (as opposed to the IRR settings), defining two hooks, and last not least passing a bitmap to render into, which I can't deliver since I want to render into the editor's bitmap.
So, how do I trigger the IRR if necessary after a camera change?