Nodes
Switch
Switch — pass one of its inputs through (which).
| Node | Switch |
|---|---|
| Type id | OC_N_switch |
| Menu | Merge › Switch |
| Nuke class | Switch |
| Code | opencomp_core/nodes/utility/switch.py |

Inputs and outputs
| Port | Name | Type |
|---|---|---|
| input 0 | 0 | image |
| input 1 | 1 | image |
| output 0 | Image | image |
Knobs
Panel tab Switch, in panel order.
| Knob | Label | Type | Default | Range / values | Nuke knob | Description |
|---|---|---|---|---|---|---|
which | which | float | 0 | 0 to 1 | which | Input to pass through (floored, clamped) |
nk_inputs | inputs | float | 2 | 1 to 16 (integer) | inputs |
Other knobs (Python, .nk and the assistant; not on the panel)
| Knob | Label | Type | Default | Range / values | Nuke knob | Description |
|---|---|---|---|---|---|---|
gl_color | Viewer Controls Color | float ×3 | 0, 0, 0 | 0 to 1 | ||
postage_stamp_frame | Static Frame | int | 1 | -2147483648 to 2147483647 | ||
lifetimeStart | Lifetime Start | int | 0 | -2147483648 to 2147483647 | ||
lifetimeEnd | Lifetime End | int | 100 | -2147483648 to 2147483647 | ||
useLifetime | Use Lifetime | boolean | false | |||
cached | Cached | boolean | false | |||
bookmark | Bookmark | boolean | false | |||
dope_sheet | Dope Sheet | boolean | false | |||
clone_group | Clone Group | string | ||||
link_source | Link Source | string | ||||
link_overrides | Link Overrides | string | ||||
split_views | Split Views | string |
Nuke equivalent
Imports from and exports to Nuke's Switch.
Knobs with a different name here:
| Nuke knob | Knob here |
|---|---|
inputs | nk_inputs |
Nuke knobs not in this list import as a knob of the same name, or are kept unchanged for export. See .nk import.
Examples
Open these from Help › Examples…, or from the ? menu in this node's Properties panel.
- Merge operations: multiply, screen, plus (
examples/merge/merge_operations.oink): Three Merges on the same A and B: multiply (darkens), screen (lightens), plus (adds light). The Switch picks which one the Viewer sees; change its "which" knob to compare.