Script exits early?
So I have a script that basically does two simple operations:
- Load a scene file, using Scene.loadScene()
- Send to an iRay Server using the Bridge, using oRenderer.exportRenderToBridgeQueue()
The script is being called from a bash script in Windows which uses the command line feature of Daz Studio to start up a new instance of Daz and call the Daz script that does the two things above.
The issue I'm having is that the Daz script seems to exit and returns to the calling process long before the two operations have completed, and returns a non-zero return status in the process. What I mean is that while the command line call returns, I can see in the Daz Studio log that the loadScene() and exportRenderToBridgeQueue() are still running. This is a problem because if I want to batch up a bunch of files to the iRay Server I need the script to fully complete before I call it again to load the next file in the batch. I could probably send the list of files to the Daz script and have it do the processing of each file from within the Daz script, but I was curious about why the Daz script returns before all of the operations have completed. I have tried to address it using backgroundProcessIsActive() but that doesn't seem to solve the problem.
Not sure where to look to see why this behavior occurs. Any thoughts?