Houdini 20.5 Nodes APEX nodes

ForEachBegin<T>

Defines the start of a for-each loop.

On this page
Since 20.0

Defines the start of a for-each loop that loops over the elements of an array, and executes the block of nodes sandwiched between this node and its corresponding ForEachEnd node (connected via their scope ports).

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

Inputs

*array: ApexNodeIDArray, ApexPortIDArray, BoolArray, DictArray, FloatArray, GeometryArray, IntArray, Matrix3Array, Matrix4Array, StringArray, Vector2Array, Vector3Array, Vector4Array Required

The array whose elements to iterate over.

__spare__

Extra inputs for use within the block. If a spare input on the ForEachBegin node matches the name of a spare input on the corresponding ForEachEnd node, the value is fed back each iteration.

Outputs

scope: undefined

Used to define the scope of the for-each loop. Must be wired to the scope input of the corresponding ForEachEnd node.

*array: ApexNodeIDArray, ApexPortIDArray, BoolArray, DictArray, FloatArray, GeometryArray, IntArray, Matrix3Array, Matrix4Array, StringArray, Vector2Array, Vector3Array, Vector4Array

The array that is iterated over.

element: ApexNodeID, ApexPortID, Bool, Dict, Float, Geometry, Int, Matrix3, Matrix4, String, Vector2, Vector3, Vector4

The element at the index position in the array.

index: Int

The index of the current iteration, starting at 0 for the first iteration.

__spare__

Pass-through of the corresponding input, for use within the block.

See also

APEX nodes