Jump to content

hda to get called back when hip file saved?

Recommended Posts


I am developing an hda, and some of its parameters need to update themselves when the file is saved (e.g. if the user changes the file name, then i need to run a code in hda to update some paths accordingly). I found some event handlers (e.g. on Created, On Loaded, ...), but could not find a handler such as (On File Saved?) ...



Share this post

Link to post
Share on other sites

you can use hou.hipfile.addEventCallback()  to register a callback for when the hipfile is saved

you can add this code in the HDA python module, or (depending on what you want to do), put it in the 'On Created' event handler to register it when the node is created, or the hipfile is loaded.  You will probably also want to check for any existing callbacks before setting a new one




  • Like 2

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