<type> attrib(<geometry>geometry, string attribclass, string name, int elemnum)
<type>[] attrib(<geometry>geometry, string attribclass, string name, int elemnum)
<geometry>
When running in the context of a node (such as a wrangle SOP), this argument can be an integer representing the input number (starting at 0) to read the geometry from.
Alternatively, the argument can be a string specifying a geometry file (for example, a .bgeo
) to read from. When running inside Houdini, this can be an op:/path/to/sop
reference.
attribclass
One of "detail"
(or "global"
), "point"
, "prim"
, or "vertex"
.
You can also use "primgroup"
, "pointgroup"
or "vertexgroup"
to read from groups.
name
The name of the attribute, group, or intrinsic to read from.
elemnum
Which element (e.g. point number, primitive number, vertex number) to read from. Ignored for detail attributes. You can use vertexindex to convert a primitive/point pair into a vertex number.
Returns
Zero/empty value if the attribute does not exist. Use getattrib if you want to check whether the attribute existed.
attrib |
|