Extract consecutive trailing numerical digits from a Houdini node name.
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
# Extract consecutive trailing numerical digits from a node's name. | |
import hou | |
return pwd().digitsInName() | |
# For example, a node named 'NEW_GEO_101' will return the int 101 | |
# into the field. Returns 0 if name does not include any trailing | |
# numerical digits. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment