This page documents the development version of Graphite at dev.graphite.art, which may differ from the current release.
Produces the index of the current iteration of a loop by reading from the evaluation context, which is supplied by downstream nodes such as Repeat.
Nested loops can enable 2D or higher-dimensional iteration by using the Loop Level parameter to read the index from outer levels of loops.
Outside of any loop, the index is 0.
Interface
Context
| Reads | Index |
Inputs
| Parameter | Details | Possible Types |
|---|---|---|
| - | No Primary Input | - |
| Loop Level | The number of nested loops to traverse outwards (from the innermost loop) to get the index from. The most upstream loop is level 0, and downstream loops add levels. In programming terms: inside the double loop Default: | Integer[]Integer |
Outputs
| Product | Details | Possible Types |
|---|---|---|
| Result | The value produced by the node operation. Primary Output | NumberNumber[] |