If you know the attribute class ahead of time, using detailattribtype, primattribtype, pointattribtype, or vertexattribtype may be faster.
int attribtype(<geometry>geometry, string attribclass, string attribute_name)
<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.
Returns
A numeric code indicating the attribute type:
|
Attribute not found, or unknown type. |
|
Integer |
|
Float or vector |
|
String |
|
Array of integers (or integer tuples) |
|
Array of floats (or float tuples) |
|
Array of strings. |
|
Dictionary |
|
Array of Dictionaries |
Examples ¶
// Get the type of the position attribute of "defgeo.bgeo" int type = attribtype("defgeo.bgeo", "point", "P");
| attrib |
|