Last active
March 13, 2024 16:10
-
-
Save simonreeves/49106c19242605b5b69459f77025273b to your computer and use it in GitHub Desktop.
simple prim "wrangle" in python SOP #houdini #python #wrangle
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
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