Skip to main content

Switch

Pass one of several tables or layers through, chosen by index. A change re-plans, and the memo keeps every input it is not showing, so switching back costs at most that input's query. For numbers, cameras and other values, use Switch Value.

Syntax​

{ "id": "n1", "op": "switch", "name": "switch", "x": 0, "y": 0, "params": {} }

An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:index, or read elsewhere as ch('switch/index').

Inputs​

PortTypeTakes
inanyseveral, in order

Parameters​

ParameterKindDefaultChoices
indexint0

Outputs​

PortType
outany

Details​

Older projects​

Projects saved before documents used operator classes. These convert to switch when they open: SwitchOp.