Created by: portnov
Addressed problem description
There are nodes, which output, for example, "All faces" and "Processed faces" or smth like that. To do something with that output, it would be usually more effective to deal with "All faces" and "Processed faces mask" instead.
Solution description
The new node takes two sets of objects (numbers, vertices, edges, faces, whatever) and returns a mask: True if item is in subset, otherwise False.
The node can work on different levels of data trees. For example, given Subset = [[1, 2], [3,4]]
and Set = [[1, 2], [3, 4], [5, 6]]
:
- with level = 0 it will output
[True, True, False]
- with level = 1 it will output
[[True, True], [True, True], [False, False]]
Given Subset = [[1], [5,6]]
and Set = [[1, 2, 3], [7, 8, 9]]
:
- with level = 0 it will output
[False, False]
(because, for example, there is no[1, 2, 3]
in the[[1], [5,6]]
) - with level = 1, it will output
[[True, False, False], [False, False, False]]
There is also new API data_structure.calc_mask
, which may be used by other nodes, including scripted ones.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.