Action Graph Overview¶
For a hands-on introduction to OmniGraph Action Graphs see Action Graph Quickstart
For more comprehensive and thorough documentation on various OmniGraph features see OGN User Guide
Action Graphs are comprised of any number of separate chains of nodes, like deformer graphs. However there are important differences which make Action graphs more suited to particular applications.
Event Sources¶
Action graphs are event driven, which means that each chain of nodes must start with an Event Source node. Each event source node can be thought of as an entry point of the graph.
Event Source nodes are named with an On prefix, never have an execution input attribute, and always have at least one output execution attribute.
Event Source Nodes |
---|
Execution Attributes¶
Action graphs make use of execution-type attributes.
The execution evaluator works by following execution connections downstream and computing nodes it encounters until there are no more downstream connections to follow. The entire chain is executed to completion. When there is no downstream node the execution terminates and the next node is popped off the execution stack
Note that if there is more than one downstream connection from an execution attribute, each path will be followed in an undetermined order. Multiple downstream chains can be executed in a fixed order either by chaining the end of one to the start of the other, or by using the Sequence node.
The value of an execution attribute tells the evaluator what the next step should be in the chain. It can be one of:
DISABLED |
Do not continue from this attribute. |
ENABLED |
Continue downstream from this attribute. |
ENABLED_AND_PUSH |
Save the current node on the execution stack and continue downstream from this attribute. |
LATENT_PUSH |
Save the current node as it performs some asynchronous operation |
LATENT_FINISH |
Finish the asynchronous operation and continue downstream from this attribute. |
Flow Control¶
Many Action graphs will need to do different things depending on some state. In a python script you would use an if or while loop to accomplish this. Similarly in Action graph there are nodes which provide this branching functionality. Flow control nodes have more than one execution output attribute, which is used to branch the evaluation flow.
Flow Control Nodes |
---|