Created
March 26, 2021 12:55
-
-
Save simonreeves/f8a6ef0d3eb9530cd8b9bcc16c586531 to your computer and use it in GitHub Desktop.
get #houdini #hda version
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
""" | |
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