Switching Menus
Currently in blender it is not possible to connect a menu to more than one socket. Even if that socket is not being evaluated.
A very good example of this would be a setup where an
Index Switch
* node is used to change what menu is being shown in the geometry nodes modifier interface.
A neat way to setup this system is to have a menu from the group input connected to the menu inputs of 2 different
Menu Switch
nodes. Then an
Index Switch
node would be used to switch between these 2
Menu Switch
es and decide which of these 2 menus should be used and be shown in the modifier interface.
This setup would be useful for having the menu show an extra option when a certain condition is met.
But as you can see in the picture, for 2 different menus, 2 different inputs are required; otherwise, the setup will return errors. This leads to an excessive number of inputs which are hard to handle in larger node trees.
So I suggest having the ability to connect a menu to multiple
Menu Switchnodes if only one of them is being evaluated .
2 Comments
It may be counterintuitive, but if you plug both menus inputs in different Group Input sockets, then you won't have an error link, because Menu data type is by definition linked to the Menu Switch node it comes from.
And then, instead of using an Index Switch, if you use another Menu Switch, the original unused menu inputs will be hidden, avoiding a bloated node group. This is counterintuitive because you will need another Menu to choose what to hide or not, instead of a single integer value. But Index Switch does not hide, it grays out, and that can't change simply because this is how it works in Blender's UI overall, and we prefer controlled consistency over too much freedom, which usually leads to more confusion.
I understand what you're asking for tho, it's a pretty unique use-case scenario. I wonder what would be a real applicable usecase for such a feature, if you have one in mind please share it!