The Switch node allows routing to different nodes depending on the input value, thereby using different branches of the nodes. There are 4 types of Switch node, depending on where you want to connect this node.
Thus, you can use one of several modifiers depending on the input value.
In the example below, if the value 1 comes from the Public node named "Input Value", then the Random_dir_01 node will be used, if the value is 2, then Noise_dir_01 node.
If you want to use a checkbox on the command panel that will turned on the Random_dir_01 node, and if it's turned off then the Noise_dir_01 node will be used, then you can configure the graph as follows:
Please note that the Boolean type of Public node provides only 0 or 1, respectively, the Switch node is configured so that if the input value = 0, the Noise_dir_01 node will be used, but if the input value = 1, then the Random_dir_01 node will be used.
An example of a node with 5 outputs:
Thus, you can use one of several mesh builders depending on the input value.
You can connect this Public node named "Use MetaMesh" to all Switch nodes that are intended for this, in order to be able to switch the mesh builder for all paths with one checkbox.
This type of node is created when you create a Switch node from the Child distributors (the right connector ) of the Path node and the child distributors (Path distributor node or Path position distributor node) to the Parent paths (the left connector ).
Here you can completely switch between different branches of the graph. For example, you can completely change the tree with one click.
In this example, you can switch the start of path lines between the GrowFX icon and some other point.
The following example implements the ability to switch between one or many branches. This is useful, for example, if the tree is calculated slowly, and you need to quickly adjust any small branches or flowers.