Switch Statement

I’d really like to be able to switch between several alternate pieces of geometry through a single statement, providing an int to choose which one - I can currently do so with a bunch of 'if’s, each testing equality on the int I’ve passed in, but I’d like a better way to do this.

1 Like

Yep, this is on the list (possibly fairly soon as it’s part of a piece of work to make the multiple-input operators nicer to use by unifying them into a single ‘automatic selection’ node based on input wiring).

The optimal alternative is to build a utility procedure using the IsBitSet pattern:

You can add as many inputs as you need but each power of two you need to add another column of If operators and double the number of Ifs within each column (although you can skip some for inputs between powers of two)