Create custom primitive attribute and assign data

What is the workflow for creating custom attributes and assigning data in a SOP?
For example create a primitive attribute called centroid
(scriptOP.primAttribs.create(‘centroid’, (0.0, 0.0, 0.0)))

and then assigning the values for the centroid of each primitive?

Hi, I think you want something like this:

Example attached. Enjoy! :slight_smile:
customPrimAttr.toe (4.0 KB)

Thank you!