Hi all!
I have a command plugin that launches a process (rendering the scene in an external rendering engine). The process takes some time to complete, so I would like it to run in the background, so that the user is still able to interact with C4D while the process in running. The external renderer has options to specify if the rendering should be performed synchronously or asynchronously (launching the render process in a separate thread). I have confirmed that these options work as intended*. Regardless of these settings however, C4D freezes during the process and waits for the process to complete.
I have not previously dealt with threading in C4D, so I am not quite sure how to approach this issue. Could there potentially be some interference between how C4D handles threads, and the threading in the renderer?
Any suggestions on how to approach this? (I am still on R19/earlier)
/Filip
*I pass a variable to a "stopper callback" function in the renderer. When the render is completed, this flag changes its value. I print the state of this variable immediately after the rendering call. If I tell the renderer to operate synchronously, the printed value indicates that the process was completed, but for asynchronous rendering it correctly indicates that the render is not completed at the time when the variable is printed.