Houdini 19.0 Python scripting hou hou.Attrib

hou.Attrib class

This class stores information about a Geometry attribute.

An attribute describes extra data you can attach to different elements of geometry. The attribute values are the individual instances of that data, and for each attribute there is exactly one attribute value per geometry element. For example, if you look at the points in Houdini’s geometry spreadsheet, the point numbers are listed down the side, the point attributes are listed across the top, and the point attribute values are contained in the table.

The attribute specifies which elements store the attribute values: points, primitives, or vertices. An attribute can also be global (also known as a detail attribute), in which case there is one instance of the attribute value in the geometry.

The attribute also specifies the data type of the attribute values.

To look up existing attributes, use hou.Geometry.findPointAttrib(), hou.Geometry.findPrimAttrib(), hou.Geometry.findVertexAttrib(), and hou.Geometry.findGlobalAttrib(). To add a new attribute, use hou.Geometry.addAttrib().


Point positions are stored in a point attribute named P and point weights are stored in Pw. See hou.Point.position() and hou.Point.weight() for more information.