How to do "case" node

So I am in a position where I need to switch between several different cases and change the input of a node depending on a selection. I am just getting started with Canvas so I am not familiar with KL syntax yet and cant code it myself.

The node should have an integer input, which selects the case and several input ports and one output port. So if case = 0, it passes input 1 to the output, if case = 1 it passes input 2, etc.

Is there a node like that already (besides "if", which does it for 2 inputs)? Are there nodes that can create more inputs programatically (ie. I can select to have for example 5 cases and it creates 5 inputs or do I have to edit the node every time)?

Of course the inverse thing would be nice as well, where I can route one input to different outputs depending on the case.

In other tools they are known as stream gate and stream filter.



Sign In or Register to comment.