Jump to content
Drughi

Confirm ui message

Recommended Posts

Is there a way to confirm a display message with python?

Share this post


Link to post
Share on other sites

Sorry for being blind. I cant find it.
I want to "click away" / accept a display message. What function do you mean?

Edited by Drughi

Share this post


Link to post
Share on other sites

Please refer to displayConfirmation/displayMessage. 

'''Prompt the user if they want to overwrite a file, and save it if they choose OK.'''
    if hou.ui.displayConfirmation("Overwrite the current hip file?", suppress=hou.confirmType.OverwriteFile):
        hou.hipFile.save()

'''Prompt the user if they want to save, and save the hip file if they choose Yes.'''
    if hou.ui.displayMessage("Save the current hip file?", buttons=("Yes", "No")) == 0:
        hou.hipFile.save()

-J

Share this post


Link to post
Share on other sites

Hi,

I just clicked 'Don't ask me again' in a Confirmation Message while I was testing a script and now I don't know how to make it appears again ( maybe in a preferences file?) 

Anyone knows ?

Thanks,

J.

 

P.D. SOLVED

There is a tab in preferences ( main menu), called 'Warning Dialogs'

Edited by josich
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×