Guidance on using scriptFinished( String filename ) signal from ContentMgr
Hi Everyone,
I have a script that needs to load several .duf files into the scene, and I wanted to take advantage of the ContentMgr::scriptFinished signal to learn when the first script completes (successfully) to load the subsequent script. It's my first time using signals, but I understand the concept. I wondered if anyone had a working example unrelated to a UI event that uses a signal-to-function connection. I have reviewed http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start, and while informative, it could use some example snippets to illustrate the uses further. As an alternative, I will see if I can use the DzScene::isLoading() method, but I would still like to educate myself further on using signals (outside the use of UI event handlers).
I appreciate any help you can provide.
Comments
I'm not sure I understand what you're trying to do exactly.
If you're loading multiple duf files, you would just use Scene.loadScene() on the first one, and Scene.loadScene() with a MergeFile open method for the subsequent ones?
Something like:
You can catch signals as the loading process is happening, which gives you the opportunity do something specific based on the event.
For example:
You could potentially call another script from the handleSceneLoaded() method.