Switch

YesNo Switch that has two outputs where further nodes can be linked. The YesNo node switches between these two sub-trees.
Switch Switch that has multiple outputs where further nodes can be linked. The Switch node switches between these sub-trees.

YesNo

The YesNo hierarchy node is a switch that has two outputs where further nodes can be linked. The characteristic of the YesNo node is that only one connected sub-tree will be rendered at a time. The selection of the active sub-tree can be done by switching the input property Yes. The switch can also be done in the Hierarchy Editor by double-clicking on the connection outputs of the YesNo Node.

Switch

The Switch node is an extension of the YesNo node. It is not limited to only two outputs but can have up to 100 outputs. Single objects or sub-trees can be connected to every output but only one of the connected subtrees will be rendered at a time.
When inserting a new Switch node into the Scene, the user is queried for the desired number of outputs.


The number of outputs can be changed later by either pressing Append Case and Remove Case at the Property Editor or by selecting the menu entries in the Node menu.

The selection of the active subtree is controlled by the property Case. It defines the index of the active output connection. The active output can also be changed in the Hierarchy Editor by double-clicking the desired case.

Another way of changing the active output is to trigger the method Set with an event which carries the output index as an event argument (see Event Node). Setting the active output by Event has no effect if the Case property is bound to another property!


If Wrap is enabled any index value is accepted and wrapped to a valid index, e.g. a Switch with 10 outputs will wrap the index value 10 to 0 and a value of -1 to 9.
If Wrap is disabled, any invalid index value will cause the Switch node not to render any output at all.