Switch (value) NIL Bug?

Hi People,

i think there is a bug in the Switch (Value) node in the Beta26.
When there is an incoming spread with some nil slices, the output is always Nil.
It happens only when i use a spread in the Switch pin.



Attached an example.

Switch bug.v4p (2.6 kB)

nope. that’s no bug.

Switch (Value Input) is switching whole spreads when Switch isn’t spreaded.

If it IS spreaded then individual slices are switched however. So for each (Switch, Input 1, Input 2) tripple (each slice of the node so to say) the Ouput slice either is equal to the slice in Input 1 or Input 2. However if one of those pins is NIL then no (Switch, Input 1, Input 2) tripples can exist. As a consequence the Ouput is NIL.

That said we could discuss a switch that works with spreads of spreads. You could then imagine one input having n slices (spreads again), where some of them are NIL… I’ll put that one on the list of might wanna have nodes.

Thanks for the explanation Sebastian, and sorry for call it bug ;).
i´ve found other way to do the same.