Created
December 20, 2018 21:22
-
-
Save spontaneOS/470dd89000592f337ae4339762b6ab37 to your computer and use it in GitHub Desktop.
List of custom HDAs from Houdini asset manager.
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
# 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