Disable popups from script?
mikek
Posts: 195
I would like to disable message boxes from script.
Under showPrompts():
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/app_dz
it says starting studio with -noPrompt will hide them. That works but the problem is it will block everything even the open file dialogues. Is there some way to block the message boxes only temporarly from script?
Or alternatively is there a way to open a daz file in silent mode so it doesn't show popups?
Post edited by mikek on
Comments
Find the noPrompt entry here http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/tech_articles/command_line_options/start to how a script can be selective about its application. You might want to look at http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start#importers
From what I have seen there are only controllable importers for external files like obj, fbx, images and such. I'm looking for a silent mode for executing other daz script files or some way to interact with their ui from script.
Something else I have fond is:
DzMainWindow::clearUIPopUp()
https://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/mainwindow_dz
But the problem there is the script won't advance when calling DzContentMgr openFile until the other script has finished which doesn't happen until a user interacts with its popup.
In case someone has a similar issue I have found a workaround but it's not a pretty one:
By using an external automation script. My Daz script first calls the external automation script to be started. The external script will wait for a Daz popup window (recognized by the title) and close it while exiting itself in case none appears. My Daz script can thus complete it's work without being blocked by the popups.
Note that noPompt is listed as an experimental feature, so it may not yet be fully integrated with other features.