Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

How to terminate a running script?

$
0
0

I'm looking at ways to terminate running scripts. Usually there is some keys you can press to terminate a running script (typically ctrl+c) but that doesn't work in Daz.

You can build in error triggers when the user clicks a cancel button on the render or load asset popup window but that doesn't seem to work right. Very often the 'click' is simply ignored.

And because of the focus-stealing 'bug' in popup windows I'm looking at starting Daz in -noPrompt mode, which works to prevent the focus stealing. It also disables all prompts so you've now gimped your instance so certain functions don't work right anymore. Why this is even a thing, I don't know, it's just Daz-logic I guess :shrug:

The documentation mentions there is such a thing as a background progress 'cancel' button. But where is this button? I've found the status bar where the progress is displayed, I see a text and a progress bar, but no button.

There is also this sample that provides a way to cancel a running process by detecting a keypress. This approach suffers from the same problem as the cancel button in popup windows where the click (in this case keypress) is simply ignored. This is probably because the application is doing something, so isn't ready to listen to user input. I haven't found a way to reliably get user input in Daz. In 'regular' JavaScript there is there event loop. Even if the script is busy, the event will eventually be handled. Clicking or pressing buttons cause an event. This is now how it works in Daz it seems.

So none of what I've described works. I can always force-quit Daz Studio but that hardly seems like a satisfying solution. Is there a feature that I'm missing? What is a good way to terminate a running script?


Viewing all articles
Browse latest Browse all 1036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>