Skip to content

Instantly share code, notes, and snippets.

@simonreeves
Last active March 13, 2024 16:10
Show Gist options
  • Save simonreeves/49106c19242605b5b69459f77025273b to your computer and use it in GitHub Desktop.
Save simonreeves/49106c19242605b5b69459f77025273b to your computer and use it in GitHub Desktop.
simple prim "wrangle" in python SOP #houdini #python #wrangle
node = hou.pwd()
geo = node.geometry()
# loop through prims on geometry
for prim in geo.prims():
# get attribute
path = prim.attribValue("path")
# set attribute value
prim.setAttribValue("path", path.split('/')[-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment