running a script on exit (or on file close)

   3749   2   1
User Avatar
Member
2 posts
Joined: Sept. 2013
Offline
I am building a framework in Houdini that creates other processes for running computations in the background. In order to cleanly gather up those processes, I need to run a small script.

I would like to run the script when Houdini exits or when the file closes. Is there any way to attach a callback to either of these events? I found the doc stub for hou.exitScript, but it is not implemented yet.

Thanks!
- J
User Avatar
Member
1925 posts
Joined: Nov. 2006
Online
Houdini should support Python's atexit module. You should be able to set something up for when Houdini closes with that.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
2 posts
Joined: Sept. 2013
Offline
That works very nicely. Thanks!
  • Quick Links