Wish: Simple data switch by If statement


Is it possible to add a new component for a simple If switch in GH2? Like the one in the image.(the condition should also be an input of course, to choose between operators)

It could be a flexible way to switch data according to different situations.

This is quite similar to the Sift component, except that it operates on matched input and output lists, rather than splitting data from a single input into one of the outputs. I guess the script would be:

if x==y:
    a = d1
    b = d1

I rarely used Sift just because it feels more easy to me to do it in Python. But because of that, many of my user objects are dependent of the Python component. And that’s what I want to avoid.

So exactly in what way is this new component supposed to differ from Sift, so that you will no longer feel it’s easier to just do it in python?

Well the difference is that I have two lists as input. The script that you wrote is like in the image I attached.