Render callbacks

On 09/06/2017 at 04:58, xxxxxxxx wrote:

Hi all,
We are trying to port our yVR tool to Cinema4D ( But there seems to be a lack of render callbacks, to attach and grab what is rendering, at least in Python.
The only way I saw that we could do this, is using a VideoPostData plugin (C++) and grab what is rendering there, but again I can't seem to grab the full image in the middle of the render only lines or pixels.
I would avoid C++, mostly to avoid recompiling for different versions, but if that is only option, we don't have a problem with it.

Best regards,

On 09/06/2017 at 07:23, xxxxxxxx wrote:

Hi Daniel,

welcome to the Plugin Café forums 🙂

As far as your actual question is concerned, we'll check out the options and will get back to you next week.

C++ vs. Python:
Actually our C++ API/ABI is pretty stable, so unless you don't use any new features, you could compile for an older version (e.g. R16) and the plugin will most likely run fine in R17 and R18. So recompiling need not necessarily be an issue.

On 09/06/2017 at 11:09, xxxxxxxx wrote:

Thanks, Andreas.
I would prefer to use Python if possible, since we will try to support both Windows and Mac users, and is much easier with a non-compiled language (no xcode hell 🙂 ).

Have a great weekend.

On 13/06/2017 at 02:25, xxxxxxxx wrote:

Hi Daniel,

the options in Python are indeed a bit limited, as you neither have VideoPost nor the ProgressHook of RenderDocument() available (see C++ docs in comparison). In C++ you could do like described in this thread: Physical render - Progressive

In Python you can do the following:
Set up a thread that will eventually call RenderDocument(). Somewhere in main thread, e.g. in a MessageData timer, read the bitmap that's being rendered into asynchronously.

On 13/06/2017 at 08:00, xxxxxxxx wrote:

Thanks Andreas,
I will try the Python approach first (it's similiar to what we do in Houdini), and if that fails, I will go for the C++ one. I will keep you post, and when I have a working implementation of yVR, I will post it here.