NameSwitch

Switches between multiple input connections, passing through the chosen input to the output. Each input has a “name” as well as a value, and switching is performed by comparing the names against the value of selector as follows :

  • Matching starts with the second input and considers all subsequent inputs one by one until a match is found. The first matching input is the one that is chosen.

  • Matching is performed using Gaffer’s standard wildcard matching. Each “name” may contain several individual patterns each separated by spaces.

  • The first input is used as a default, and is chosen only if no other input matches.

user

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

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.

selector

The value that the input names will be matched against. Typically this will refer to a Context Variable using the ${variableName} syntax.