prim expression function

Returns the value of a primitive attribute.

Replaced by: hou.Prim, hou.Geometry

All Usage Examples

See also: primuv, point

Usage

prim(surface_node, prim_num, attrib_name, attrib_index)

When given the “P” or “Pw” attribute, returns the centroid of the primitive.

Examples

prim("/obj/geo1/facet1", 3, "P", 0)

Evaluates the X component of the centroid of primitive 3 in the specified surface node.

prim("/obj/geo1/facet1", 3, "Cd", 1)

Evaluate the green color of the “Cd” attribute of primitive 3.