Switch
VEX node
Outputs the value connected to one of its inputs.
See also: And, Compare, If, Or
This operator outputs the value connected to one of its inputs. The first input is always an integer that specifies the index of the value to output. The other inputs can be of any type, but they must all be the same type.
Inputs
Switcher Index
The value connected to this input is used as an index to determine which input value to feed into the output value. For example, a value of 0 will choose input1; a value of 1 will choose input2, and so on.
Usually, the switcher index will be connected from the output of a Compare operator, or one of the logical operators (And and Or).
Input Number N
Any number of inputs can be connected here. Each time an input is connected, a new input slot is added.
Outputs
Chosen Value
This output will be of the same type as all the inputs.
See Also
-
And, Compare, If, Or, Two Way Switch
Inputs
|
Switcher Index |
The value connected to this input is used as an index to determine which input value to feed into the output value. For example, a value of 0 will choose input1; a value of 1 will choose input2, and so on. Usually, the switcher index will be connected from the output of a Compare operator, or one of the logical operators (And and Or). |
|
Input Number N |
Up to 64 inputs can be connected here. Each time an input is connected, a new input slot is added. |
Outputs
|
Chosen Value |
This output will be of the same type as all the inputs. |
Usages in other examples
| Example name | Example for | |
|---|---|---|
| Fire Pit example |
Material shader |
|
| FurTextureMap |
Fur surface node |
|
| RampReference | ||
| PaintedGrog |
Fluid Object dynamics node |
|
| RivetWaveform |
Rivet object |