String Switch Node
A String Switch node would enable a string input to control the output of a switch.
This would function similarly to the current Menu Switch node. The Menu Switch also selects the input via a user-defined string, but that string is contained within a menu that does not allow for procedural selection. Exposing this string through a string socket would enable procedural control.
The Index Switch node currently handles invalid inputs (integers outside the index range) by giving no output. A String Switch could handle invalid string inputs (strings that do not match any index name) the same way - give no output. It would also handle input-string fields for selection socket-types that support them.
7 Comments
You can use
Index Switchnode with menu output linked toMenu Switchnode.?? That still doesn't allow a string to control the switch.
What happens when the string doesn't match anything ?
@maxime1 The node would give no output, and have an info bubble at the top saying there is no match.
Less practical but you can use the equal node to compare strings as follow : media.discordapp.net/attachments/559890939292680192/1531643192934662257/Capture_decran_2026-07-28_144233.png
To be honest it's possible just need to create some logic beforehand. Still a cool idea :)
Yes. However, it is cumbersome to set up/modify for additional inputs. And evaluation time scales rapidly with the number of inputs, because each comparison is sequential.