Created
December 20, 2018 21:19
-
-
Save spontaneOS/d4aeaa4fc3ad293cb7fb7afe75a231b5 to your computer and use it in GitHub Desktop.
Save a Houdini Digital Asset through tool shelf button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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