Official python bindings?

   7812   4   2
User Avatar
Member
130 posts
Joined: June 2019
Offline
In this video: https://vimeo.com/284044473 [vimeo.com] Jeff Wagner said that there is a python frontend though I can't find one.

It's not that difficult just to map one to one to C functions I was just wondering may be you have something more interesting. Also with the new python support for UE4 it actually can makes sense. Not only in UE4 (though it really looks like it would fit perfectly there) but also for some quick command line tools.
User Avatar
Member
130 posts
Joined: June 2019
Offline
I just totally missed the part that I can use hom from regular python shell and make command-line tools with hou module. That of course means that there is no point in such low level API.

Actually I found that somebody did the bindings already: https://pyhapi.readthedocs.io/en/latest/ [pyhapi.readthedocs.io] though I'm not sure how practical it can be. May be in some environment where you can't use python2.7
User Avatar
Member
4271 posts
Joined: July 2005
Offline
The only value(*) in having a Python front end is just quick prototyping and exploring ideas in a Jupyter notebook or similar before committing to C/C++. If you just need Python and Houdini, as you said, use the Hython/hou module. Nice and easy.

* - I say this having done a thin wrapper myself. https://github.com/shadeops/pyHAPI [github.com]
if(coffees<2,round(float),float)
User Avatar
Member
3 posts
Joined: Dec. 2016
Offline
elovikov
I just totally missed the part that I can use hom from regular python shell and make command-line tools with hou module. That of course means that there is no point in such low level API.

Actually I found that somebody did the bindings already: https://pyhapi.readthedocs.io/en/latest/ [pyhapi.readthedocs.io] though I'm not sure how practical it can be. May be in some environment where you can't use python2.7

Hi, glad someone found my python-binding https://github.com/maajor/pyhapi, [github.com] basically it just
  • Wrap houdini engine's C API
  • Provide an object-oriented interface

About use case, I write it just because I made some HDA and doesn't want to launch houdini/maya/unity to use it, so I can process geometry with the HDA in command-line. For example, I made HDA to do rough skinning and simulation, I call with command-line to batch such processing, just like PDG but within command-line.
User Avatar
Staff
600 posts
Joined: May 2014
Offline
The next release of Houdini will ship with Python bindings for HAPI, which may be what Jeff was referring to in that video. The bindings are generated automatically from the function/struct definitions in the HAPI headers. They expose the majority of the functionality in the API and will work with both in process and out of process HAPI sessions.
  • Quick Links