Switch

Chooses between multiple input connections, passing through the chosen input to the output.

user

Container for user-defined plugs. Nodes should never make their own plugs here, so users are free to do as they wish.

index

The index of the input which is passed through. A value of 0 chooses the first input, 1 the second and so on. Values larger than the number of available inputs wrap back around to the beginning.

enabled

Turns the node on and off.

deleteContextVariables

The names of context variables to be deleted before accessing the array of inputs. Names should be space-separated and may use Gaffer’s standard wildcards.

Tip

This is convenient for cleaning up context variables only needed to compute the switch index.

connectedInputs

The indices of the input array that have incoming connections.

Tip

This can be used to drive a Wedge or Collect node so that they operate over each input in turn.