Skip to content

Instantly share code, notes, and snippets.

@spontaneOS
Created December 20, 2018 21:22
Show Gist options
  • Save spontaneOS/470dd89000592f337ae4339762b6ab37 to your computer and use it in GitHub Desktop.
Save spontaneOS/470dd89000592f337ae4339762b6ab37 to your computer and use it in GitHub Desktop.
List of custom HDAs from Houdini asset manager.
# List of custom HDAs from Houdini asset manager.
def findLoadedHDAs():
'''
Returns a list of loaded HDAs in Houdini scene.
HDAs installed by default with Houdini are skipped.
'''
loadedHDAs = []
# Scan all node categories
for category in hou.nodeTypeCategories().values():
# Scan all node types
for nodeType in category.nodeTypes().values():
nodeDef = nodeType.definition()
# If its a valid and unique HDA
if (nodeDef is not None) and \
(nodeDef.libraryFilePath() not in loadedHDAs):
# If not stored at "HFS" (Houdini Installation)
if not nodeDef.libraryFilePath().startswith(hou.getenv("HFS")):
loadedHDAs.append(nodeDef)
return loadedHDAs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment