sverchok
sverchok copied to clipboard
Enhance List Mask Out to work on multiple lists
Like the title says, instead of just separating true data from false on one list, do it with multiple parallel lists, and add a match length option.
It seems can work with multiple lists
Well, I know it can work like this, what I mean is having multiple lists attached to multiple inputs sockets, generated in the same way as List Join, to treat parallel streams of data, like vertices/faces/material, without needing one List Join node before and one List decompose node after.
Can you illustrate how such node could look like?
The first input would be the mask socket, then there would be one default data0 socket, and each time this socket is linked, a new one is generated under : data1, data2, etc... In the outputs, there would be one mask socket, then ind_true1, ind_false1, data1True, data1False default sockets, and each time a new input datax is linked, the corresponding outputs ind_truex, ind_falsex, dataxTrue, dataxFalse would be created. Also, the length of the mask input should be independently matched with the length of each data input at the level to apply masking.
I would agree with such proposal if each input data socket has only one correspondent output (probably data true
) socket (new node?). But to repeat all 5 sockets for each input will stretch the node too far.
And probably there is nothing wrong to have separate node for each task. I'm not sure which problem this should solve? (filter mesh attributes?) As for vertices/edges/faces, as far as I know, the same mask can't be applied to filter mesh elements. And also there is Mask Vertices node for such task.
Also if to join streams of data into one node it makes tree recalculations more heavier because changes in one stream will cause recalculation of all others (not only inside the node but in all next ones).
Well, there isn't a problem, it's just that it creates more clutter. And I am not filtering elements of a single mesh, but filtering a list of meshes, so I do not believe there is another straight way. I also just realized, there is no need to repeat mask, ind_true and ind_false, only dataTrue and dataFalse. Would that make it acceptable, for one additional input, adding two additional outputs?
Two is certainly better than five. )) Any way this requires new version of the node or separate one.
My opinion is that mask, ind_true, ind_false (probably even dataFalse) sockets make the node too verbose. ind_tru and ind_false outputs can be produced by Mask To Index node and I don't see when it useful to have output data from ind_trur and dataTrue sockets together. Usually I use either index mask or filtered data. So probably they can be removed but I remember there was argument about that in past.
Yeah, I agree that ind_true and ind_false are not what you would expect from this node, but rather Mask to Index, so they can be removed in the new version. Mask is absolutely useless as it is the same as input. So I think dataTrue and dataFalse are the only really useful sockets. So that would make te node have mask and one or more data inputs, and as many sets of dataTrue, dataFalse outputs as data inputs. I do not need that node right away, but in trees I will be implementing a few months from now. So, if anyone is willing to implement that by then, great. Otherwise, I'll do it myself when I need them.