Indices Selection Node
This node extracts numbers and symbols from a string input(from the user interface) and use those number to fill the selection output.
Basically speaking, it iterates from character to character of the input text and see if it finds a number or symbols. If a different symbol is found(I will list the allowed ones below) a warning will display and the selection output will be all false(so i won’t select anything). Here are the allowed symbols:
’*’ - This symbol fills the selection Array / field output to true;
’!’ - This symbol removes every other number or list after it from the selection(ex: !5 deselect the 5º number from selection array; !1:10 deselect from 1 to 10 numbers of the selection array);
’,’ - The comma symbol checks if there are numbers grabbed before it by the stack variabel and insert it to the list. The list at the end will fill the selection Array / Fied.
’:’ - This symbol works much like python does. It will fill from x:y(ex: 1:10 will fill the selection array from 1 to 10, if there’s ! it will fill with false).
’0123456789’ - Numbers will be append to the list if it finds a comma or the end of text will append to a ADD list and then fill the selection[number] = true. If the number contains ! it will append to a REMOVE list and then fill the selection[number] = false.
If the input text contains any other symbol it will display a warning message and the selection field will be false(it wont select anything).
There is also plan for a UI for the input string, for now i’m fixing any existent bug.
Here’s a video of it working:
Also, let’s compare the old way vs new way. New way took one node to select and 13 ms total. Where as the old way took 0.19ms total and 16 nodes, all of that for just 5 selections:
Community, feel free to send me use case of this node. It’s working well but you can send me
bug report and examples at firstname.lastname@example.org
I’m doing this node for the community.