Search - User list
Full Version: Making a blocking task that waits for input from a human
Root » PDG/TOPs » Making a blocking task that waits for input from a human
Philj
Is it possible to make a task that opens up something to ask a user “have you done X? : yes/no” and then does not complete the task until the user responds?
old_school
Cheap and cheerful you can use the hscript “message” command anywhere you evaluate a parameter or houdini hscript (HDA scripts like onupdate script, shelf button, etc):

In a texptort type:
help message
to see help usage on the command
Then try:
message -b "Press Me"
will pop up a dialog that will pause EVERYTHING until you hit that button.

If Python and you want also cheap and cheerful, you can use hou.ui.displayMessage()

In a Houdini Python Shell type:
hou.ui.displayMessage("My Dialog", buttons=("OK",))


Beyond that you are writing your own Python +QT interrupt.
old_school
Note that both those functions return data so you can use this to make further decisions.
Philj
Thanks Jeff! I put the hou.ui.displayMessage inside a python script top and that gives exactly what I want.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB