Skip to content

Instantly share code, notes, and snippets.

@morphingdesign
Created February 10, 2021 05:19
Show Gist options
  • Save morphingdesign/266db391ee35746ef81b51b1b5e9775e to your computer and use it in GitHub Desktop.
Save morphingdesign/266db391ee35746ef81b51b1b5e9775e to your computer and use it in GitHub Desktop.
Extract consecutive trailing numerical digits from a Houdini node name.
# 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