Skip to content

Instantly share code, notes, and snippets.

@simonreeves
Created March 26, 2021 12:55
Show Gist options
  • Save simonreeves/f8a6ef0d3eb9530cd8b9bcc16c586531 to your computer and use it in GitHub Desktop.
Save simonreeves/f8a6ef0d3eb9530cd8b9bcc16c586531 to your computer and use it in GitHub Desktop.
get #houdini #hda version
"""
A HDA version is inside the name
So the logic is node > type > name
There is a convience function that splits the namespace, from docs:
# parse the full name into components
>>> node_type = hou.nodeType(hou.dopNodeTypeCategory(), 'pyrosolver::2.0')
>>> node_type.nameComponents()
('', '', 'pyrosolver', '2.0')
# docs https://www.sidefx.com/docs/houdini/hom/hou/NodeType.html#namecomponenets
"""
# check if float version is greater than 0.2
node.type().nameComponents()[-1]) > 0.2:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment