Hi,
How to add a name attribute to each point in a selected geometry via the python sop?
Suppose I have a box with 4 points and I want each point to be named as piece0, piece1 and so on where the number is its point number. I have written a code, it adds the attribute to the spreadsheet but is unable to add the value. The value is added only when it is not a string. Please Help.
The code that I tried:
node = hou.pwd()
geo = node.geometry()
geo.addAttrib(hou.attribType.Point, "name", "piece")
Please also add how to add the respective point numbers to the string piece.
Thanks