Skip to content

Instantly share code, notes, and snippets.

@spontaneOS
Created December 20, 2018 21:19
Show Gist options
  • Save spontaneOS/d4aeaa4fc3ad293cb7fb7afe75a231b5 to your computer and use it in GitHub Desktop.
Save spontaneOS/d4aeaa4fc3ad293cb7fb7afe75a231b5 to your computer and use it in GitHub Desktop.
Save a Houdini Digital Asset through tool shelf button
# Save a Houdini Digital Asset through tool shelf button
def saveHDA(hdaName_to_save):
'Save a particular HDA.'
# Get all instances of HDA
for node in hou.node("/obj").children():
hdaName = node.type().definition().nodeTypeName()
if hdaName_to_save in hdaName and (not node.isLocked()):
node.type().definition().updateFromNode(node)
saveHDA("HDA_NAME_TO_SAVE")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment