What’s new in Houdini 9: Python scripting
You can now script Houdini using Python, a very powerful and easy-to-learn object-oriented language.
Overview
Houdini now includes a built-in Python interpreter. You can use Python to script Houdini using objects and functions from the hou module, which is automatically imported by the embedded interpreter.
The new scripting API will replace HScript going forward.
Using Python in Houdini
For information on the functions, classes and methods available, see the Houdini object model.
To open a Python shell, choose Windows > Python shell.
The Python shell includes tab completion of class and method names.
To open a Python editor for writing longer scripts, choose Windows > Python source editor.
To create a new surface node whose behavior is defined in Python, choose File > New operator type and set Operator style to
python.
hython
Houdini includes a command-line Python interpreter called hython. This is just like the standard python interpreter but it automatically makes the hou module available for scripting using Houdini objects. You can use this in similar situations where the hscript command line interpreter was useful.
