Type annotation builder for SideFX Houdini hou
-python Module
- run
main.py
to build the stub files$ hou_stubs/main.py "/path/to/your/houdini/19.5.303/houdini/python3.9libs/hou.py" # eg.: $ hou_stubs/main.py /software/houdini/19.5/houdini/python3.9libs/hou.py --out=./hou-stubs
- include them in your
$PYTHONPATH
$ export PYTHONPATH="${PYTHONPATH}:/the/path/where/hou-stubs/is"
Error Checking:
IDE Docs:
here is an example from the generated stubs:
-
Some C++ type are'nt 100% correct translated. In some cases I took shortcuts and and used similar behaving python types. eg.: pointers are just dropped. Different variations of Integer/Float/String types are all annoted as their basic
int
/float
/str
. -
The imports and namespaces in the submodules is a bit messy. Maybe its best to keep everything combined as one big module.
-
process.process_parameter
currently readsfunc.module.classes
which takes a decent bit of time. Might be worth trying to optimize this. Maybe wrap the griffe-classes into our own sublclasses and makeclasses()
a cached property -
Only the
hou.py
itself is supported/test. In theory the code should work fine on other modules, but its untested as of right now.
Large parts of the Code are inspired by mypy-boto3-builder.