catchyid Posted March 9, 2021 Share Posted March 9, 2021 hi, 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?) ... thx, Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted March 10, 2021 Share Posted March 10, 2021 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 https://www.sidefx.com/docs/houdini/hom/locations.html#scene_events https://www.sidefx.com/docs/houdini/hom/hou/hipFile.html 2 Quote Link to comment Share on other sites More sharing options...
catchyid Posted March 10, 2021 Author Share Posted March 10, 2021 thaaaaaaaaaaaanks Drew Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.