paxsonsa Posted August 31, 2015 Share Posted August 31, 2015 Can Houdini have Python Event Callbacks? Specifically when a the hip file is saved or when houdini closes? Quote Link to comment Share on other sites More sharing options...
fathom Posted September 1, 2015 Share Posted September 1, 2015 if you find a solution, i'd love to hear it. they really need to add a robust system-wide event system for such things. Quote Link to comment Share on other sites More sharing options...
dedeks3000 Posted September 1, 2015 Share Posted September 1, 2015 maybe this : http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=146042&highlight= Quote Link to comment Share on other sites More sharing options...
fathom Posted September 3, 2015 Share Posted September 3, 2015 (edited) yeah, you can kind of do some things by hijacking others. like 456.py runs after you load a file. atexit() runs when you close. there are all sorts of parm and operator related events that could theoretically be used to mimic a real event system, but ideally they'd just implement one for reals. hell, even a 789.py that runs when you save would be awesome. edit: i suppose you could register all nodes to react to all events and check the status of the hipFile.hasUnsavedChanges() flag combined with the file path to detect saves and react to those. but again, do we really have to resort to such hackery? Edited September 3, 2015 by fathom 1 Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted September 9, 2015 Share Posted September 9, 2015 hou.ui.addEventLoopCallback 1 Quote Link to comment Share on other sites More sharing options...
Alexey Vanzhula Posted September 13, 2015 Share Posted September 13, 2015 And: import hdefereval hdefereval.executeDeferred( callback ) Just for executing callback once 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.