sverchok
sverchok copied to clipboard
Deal with empty lists in List Mask Join (In) inputs
Sometimes, the List Mask Join (In) node can be used to switch between empty lists and non empty ones, in order to make sure no empty list get to the rest of the treatment (especially for the Loop In node). In this case, the chosen data with the mask is of course that of the non-empty lists, but the node outputs nothing when choice option is checked because of the match length option. So, I suggest to modify the node to make it compatible with this usage, as deactivating the choice option works the same way only when there is one list in each input (whatever its level of nesting).
It seems Switch can do this
Yeah, probably because there is no length matching. However, it only works on 2-level data, whereas I work with 1-level data, and any nesting level should be considered. That means there is a solution for 1-level and 2-level nested data, but no further.
It seems List Mask Join node works too even with other dimensions.
Okay, it works, but without checking choice option, the behaviour is different. Although it works fine in my case, it may not always be the case, as it is just a corner case not intended by the node designer.
If it works I don't see the problem.
It works in this particular case, but if you use an arbitrary number of non-empty lists, it won't behave as wished anymore, but as intended by the node designer. In my case, I use only one list in each input, so it is fine, but I just say this solution isn't neat as it is making use of a corner case of the node, not intended to be used, so it might be broken with further development. So, ideally, this issue should be formally addressed.