Documentation / Node reference / geo nodes

geo/ForEachEnd

Closes a geo/ForEachBegin loop: cooks the nodes in between once per entity and merges the results.

Flow

Creating either node from the tab menu creates the other one, wired and named. Otherwise point `beginNode` at the geo/ForEachBegin that opens the loop, and wire the last node of the loop body into input 0. On each pass the Begin outputs one point, primitive or object, the body cooks from it, and this node keeps a copy of what the body produced. Every object of the output carries an ITERATION attribute saying which pass made it. The body does not have to be wired to the Begin: a node reading it by expression (`pv`, `attrib`, `centroid`) repeats too. A node in the body that waits for a file, such as a geo/Text fetching its font, makes the loop wait and run again once the file is there.

Parameters

Name Type What it does
beginNode NodePath The geo/ForEachBegin that opens this loop, e.g. `../forEachBegin1`.
addIterationAttribute Bool Write the pass number on every output object, as the U32 object attribute ITERATION.

Examples

Scenes you can open in the editor that teach this node.

A loop that runs once per quad of a plane and writes each quad's number on it. geo/forEachBegin hands the loop one quad at a time, and the nodes in the loop read it by expression: the text takes the quad's ID, the transform takes its centre. geo/forEachEnd gathers what every pass produced.

geo/ForEachBegin geo/ForEachEnd

Modeling Attributes

See also

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.