Questions about AiRenderBegin()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been using a callback function with the deprecated AiRender() function for a bit now and it's worked perfectly fine, but I'm interested in adding interactive rendering to my app and think it's time to seriously look at AiRenderBegin() instead. I'm not sure I fully understand how it works in relation to the callback though.
At the moment, I'm creating a callback function and assigning it like this with the Python API (simplified for clarity):
def my_callback_function(param1, param2, param3, param4):
# render pixels to the screen
arnold.AiNodeSetPtr(display_driver_node, "callback", my_callback_function)With AiRenderBegin(), it looks like the callback should be passed directly to the render function. Is this right? I tried simply swapping out AiRender() for AiRenderBegin(), leaving the rest of the callback code the same, and it exited with a memory allocation error. But, I'm assuming the callback would need to put all of the data that previous passed as parameters into an iterable of some kind that gets passed with *private_data.
I know I'm starting to ramble, but I'm hoping someone can confirm whether I'm on the right track or not. I appreciate it!