Jump to content

Confirm ui message


Drughi

Recommended Posts

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

Link to comment
Share on other sites

  • 7 months later...

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...