I have a python script creating a bunch of node for artists to use. My problem comes in when I want to add an hda in.
So code goes like this
# Initialize parent node variable.
if locals().get(“hou_parent”) is None:
hou_parent = hou.node(“/obj/geo1”)
# Code for /obj/geo1/sphere1
hou_node = hou_parent.createNode(“sphere”, “sphere1”, run_init_scripts=False, load_contents=True, exact_type_
name=True)
hou_node.move(hou.Vector2(-48.0151, 10.0539))
# Code for /obj/geo1/remesh1
hou_node = hou_parent.createNode(“remesh”, “remesh1”, run_init_scripts=False, load_contents=True, exact_type_
name=True)
hou_node.move(hou.Vector2(-48.0151, 9.05386))
# Then I would like to bring in my HDA here #
##### Code to import an HDA like you would other nodes
# Code for /obj/geo1/output0
hou_node = hou_parent.createNode(“output”, “output0”, run_init_scripts=False, load_contents=True, exact_type_
name=True)
hou_node.move(hou.Vector2(-48.0151, 6.52819))
#ext…
when they pressed the button it needs to end up looking like the image attached:
If tried looking into:
https://forums.odforce.net/topic/32386-create-hda-using-python/ [forums.odforce.net]
http://www.sidefx.com/docs/houdini/hom/hou/HDAOptions.html [www.sidefx.com]
But have had no luck.
Any help would be greatly appreciated.
Thanks