Houdini 22.0 Nodes APEX nodes

geo::SetPrimAttribValuesFromArray<T>

Sets the values of a primitive attribute from an array.

On this page
Since 22.0

Sets the values of a given primitive attribute from an array. This can be used with geo::PrimAttribValuesToArray to get data from a geometry.

Tip

Getting the primitives as an array and looping over the array elements has a significant performance advantage over looping over the primitives and getting the values individually because it reduces the need to look up the data multiple times.

Warning

When doing major geometry operations, this is not a good replacement for VEX or OpenCL.

The geo ports of this node are in-place ports, which means the geometry is updated without creating a copy.

Inputs

*geo: Geometry Required

The geometry on which to look for the attribute.

values: DictArray, FloatArray, IntArray, Matrix3Array, Matrix4Array, StringArray, Vector2Array, Vector3Array, Vector4Array

The values to set on the attribute.

attribname: String

The name of the attribute whose values to set.

group: String

A group expression to filter the selection of primitives whose attribute values to return.

Note

It’s important that the input array size is the same as the group size. If the array is larger than the group, the node will raise a warning because not every item in the array will be used. If the group is larger than the array, the node will raise an error because there aren’t enough items in the array to fill the group selection.

Outputs

*geo: Geometry

The modified geometry.

success: Bool

Returns True if the operation is successful. The operation can fail if the attribute cannot be found on the geometry or group is invalid.

See also

APEX nodes