Skip to content

Instantly share code, notes, and snippets.

@gfxhacks
Created June 19, 2020 16:51
Show Gist options
  • Save gfxhacks/6decbcb363bb4b474a7e0316e93f3166 to your computer and use it in GitHub Desktop.
Save gfxhacks/6decbcb363bb4b474a7e0316e93f3166 to your computer and use it in GitHub Desktop.
Basic Python Parameter creation workflow in Houdini: https://gfxhacks.com/create-parameters-in-houdini-with-python
# get node (find the path in your node's info panel)
n = hou.node("/path/to/node")
# get existing list of parameters for the specified node
g = n.parmTemplateGroup()
# define new float parameter ("id", "Label", components/input fields, default values)
p = hou.FloatParmTemplate("myParm", "My Parameter", 3, default_value=[1, 1, 1])
# append the new parameter to the list
g.append(p)
# apply changes
n.setParmTemplateGroup(g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment