Creating/Editing Python Module on the HDA using Python?

   386   2   2
User Avatar
Member
12 posts
Joined: 1月 2019
Offline
Hello everyone,

I am working on a script to create a HDA from the scratch using Python.

Now I want to work on the Scripts section of the HDA. I want to basically create a Python module and edit them later down the line.




I tried to look for information on this to no avail.
Dragging the HDA into the python shell + .asCode() didn't help either.

Any help or suggestions, or pointing me to the resources would be very appreciated.

Thank you.
Edited by weerapot-c - 2024年10月28日 14:32:32

Attachments:
HDA Python Module.png (73.7 KB)

User Avatar
Member
385 posts
Joined: 4月 2017
Offline
The HDA Python Module is one of the Sections available in the HDADefinition:

myNode.type().definition().sections()["PythonModule"].setContents(myPythonCode)

Check the bottom of this doc page: https://www.sidefx.com/docs/houdini/hom/hou/HDAModule.html [www.sidefx.com]
Edited by toadstorm - 2024年10月28日 15:18:58
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
12 posts
Joined: 1月 2019
Offline
Thank you so much!
  • Quick Links