For Each Loop
Activates the ‘Loop Body’ signal once for each element in the ‘Input Array’, making the current array member available in ‘Element’ with its index in ‘Array Index’. After every element of the ‘Input Array’ has been processed the ‘Finished’ signal is activated. All of this will happen in a single execution of the node, giving you the ability to evaluate a downstream graph multiple times with different inputs coming from the changing ‘Element’ output.
Installation
To use this node enable omni.graph.action_nodes in the Extension Manager.
Inputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Input Array (inputs:arrayIn) |
|
The array to loop over |
None |
Exec In (inputs:execIn) |
|
Signal to the graph that this node is ready to be executed. |
None |
Outputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Array Index (outputs:arrayIndex) |
|
The value of the current index being visited by the loop. Keeps the value of the last index after the loop has completed. The index starts at zero and increments by one as it walks through the members of ‘Input Array’. |
None |
Element (outputs:element) |
|
The current member of ‘Input Array’ being visited by the loop. Keeps the value of the last array element after the loop has completed. |
None |
Finished (outputs:finished) |
|
When the final element of ‘Input Array’ has been processed signal the graph that execution can continue downstream. |
None |
Loop Body (outputs:loopBody) |
|
For each member of ‘Input Array’ signal the graph that execution can continue downstream. |
None |
Metadata
Name |
Value |
---|---|
Unique ID |
omni.graph.action.ForEach |
Version |
2 |
Extension |
omni.graph.action_nodes |
Icon |
ogn/icons/omni.graph.action.ForEach.svg |
Has State? |
False |
Implementation Language |
C++ |
Default Memory Type |
cpu |
Generated Code Exclusions |
None |
uiName |
For Each Loop |
Categories |
graph:action,flowControl |
Generated Class Name |
OgnForEachDatabase |
Python Module |
omni.graph.action_nodes |