Created
May 14, 2021 01:37
-
-
Save morphingdesign/845c3ce798428b1bc6bd7e4d10817d40 to your computer and use it in GitHub Desktop.
Rename fracture piece @name attribute with padded numbering in Houdini VEX.
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
// Fractured pieces are generated with @name such as 'piece0', 'piece1', etc. | |
// The following prim wrangle renames each piece with a padded number. | |
// String var to hold padded piece number. | |
string new_name = sprintf("piece_%04d", opdigits(@name)); | |
// Update piece name. | |
s@name = new_name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment