How towait/trigger for Canvas to render

liviucliviuc Posts: 6

Is there any way to wait/trigger Canvas viewport rendering during, or after, a Node is evaluated several times? All my attempts so far did not work. It looks like the rendering thread only kicks in when EVERYTHING in the graph has been evaluated.

What works: pull a rendering Node exec port once. After that, rendering happens and I get a Viewport callback.

What does not work:
1. execute a KL function that performs rendering several times in a KL loop. Rendering only happens once at the end of the loop.
2. pull a rendering node port several times using a Control.ForLoop. Rendering only happens once at the end of the loop
3. Execute a rendering graph loaded via DFGBinding in a loop (binding.exec()) Same as above
4. Pull a rendering node several times using ScriptEditor to set an argument like binding.setArgValue("idx", "SInt32", str(idx))

In all the above cases, I only get a Viewport post-draw callback once, at the end. Is there a way to tell Canvas to take a breath in-between and render ?

Thanks
Liviu

Sign In or Register to comment.