rendering current frame (in picture viewer)

On 04/01/2018 at 08:03, xxxxxxxx wrote:


I try to get the hang of the process of rendering to the picture viewer and organizing my (tag-)plugin corresponding to this logic. So far this is my understanding:

during the render process the document gets cloned and using the "CopyTo" function I can take over any object from the original document to the cloned document. But now lets say some calculation has been done in the first 200 frames resulting in some object and now I want to render only this one frame 200, how can I prevent (after configuring "current frame" in the render settings) that the "execute" function runs first 199 times before the picture viewer renders (after some annoying delay) this one current frame ?

In other words: can I somehow skip the complete render preparation and tell the system: forget what happened in the first 199 frames, take only the (already calculated) current object and start immediatly rendering only current frame 200 without going through the previous 199 frames ?

Checking for c4d.MSG_MULTI_DOCUMENTCLONED in the "Message" function and defining some "isRendering" variable I can avoid the rerun of the calculation steps but nevertheless I have a delay of 2 seconds until the plugin finally renders frame 200. Would be great if I somehow can get rid of this delay.


On 05/01/2018 at 06:37, xxxxxxxx wrote:

Hi Jens and thanks for writing us.

With reference to your request, you could reach the same result consider approaching the problem by two sides:

  1. set RDATA_NOPREROLLING to "True" in the active RenderData in order to avoid any pre-rolling activity and then fire a render to PictureViewer;
  2. or set the desired frame via BaseDocument::SetTime() and execute RenderDocument()  without updating the scene via BaseDocument::ExecutePasses() for the preceding frames.

In both cases the rendering should start almost immediately.

Best, Riccardo

On 05/01/2018 at 13:56, xxxxxxxx wrote:

Hi Riccardo,

thanks for your answer !

I've just tested your solution 1 - works great 🙂 So far I've only concentrated on the RDATA variables in the python documentation. Here RDATA_NOPREROLLING isn't listed. So I've learned the lesson that the C++ documentation should also be consulted 😉

Since I'm curious how 2) would work: I understand the steps SetTime + RenderDocument ... but what do you mean with "without updating the scene via ..." ? In the tag plugin code I've not used any "ExecutePasses". How can I do "RenderDocument" and skip this "ExecutePasses" ? Or is this something that would only work in a C++ plugin ?

best regards,