Python houdini biography
Python script locations
General tips
If you need to check whether some code ran, the easiest way is to call hou.ui.displayMessage:
importhouhou.ui.displayMessage("I ran! I ran so far away!")You can also use this to display the values of variables.
How do you use Python in Houdini? : r/Houdini - Reddit
For example, to see what’s in the global variable in an event handler:
importhouhou.ui.displayMessage(repr(kwargs))You can share code between handlers by putting it in a module on disk and calling it from the handler script. For example, the handler script might just pass the to a common function:
importcompanyutilscompanyutils.on_created(kwargs)Houdini has a very large, powerful (but verbose) set of APIs.
Browsing through what’s available in the API reference will help you discover what’s possible with scripting.
In general, Houdini looks for “scripts” (usually callback scripts) on disk under , while modules you would import are under or .