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
| Port | Type | Takes |
|---|---|---|
in | any | several, in order |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
index | int | 0 |
Outputs
| Port | Type |
|---|---|
out | any |
Details
- Category: Structure
- Operator:
switch
Older projects
Projects saved before documents used operator classes. These convert to switch when they open: SwitchOp.