Jump to content

displaying a message after pasting an HDA


celd

Recommended Posts

Hi,

I wrote some code into OnLoaded event handler to run when I paste the HDA, something like this:

if not hou.hipFile.isLoadingHipFile():
    rebuild_prompt = hou.ui.displayMessage( "Would you like to rebuild?" , ("Rebuild", "Do not Rebuild"))

It seems opening a ui dialog like this breaks the copy-pasting process and does not move the pasted node into a correct position near the cursor. I thought about manually moving the node to the cursor in the code after the dialog, but I dont think it makes sense and I cannot even access the node I am copying anyway (assume many nodes in a subnet all being copied at once)
       

Any idea how to have a dialog that opens when HDA is being copy-pasted but in a way that doesnt stop/break the copy-pasting itself?

Many thanks

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...