Get BooleanMask in and out list in Python Node



I’m practising and translating a script which is in visual programming into a single Python script. I’ve come so far that I applied a FilterByBooleanMask node and now I have a dictionary with two entries. But I’m having trouble “splitting” the dictionary now. So my goal is to have a new list (list_in) and (list_out) with the values from the dictionary.

I’ve googled standard Python methods but haven’t found anything that worked yet. Any ideas?

This is what the current output is


You already have two lists. If you want to split them, you can add a code block with:


to split it in 2 paths. Or did I misunderstand your question?

I think it is not possible to make 2 outputs from a Python block, but I may be wrong.


Sorry, I didn’t explain correctly. I want to continue the Python script and use the in List and the out List (that are currently inside a Dictionary) separately so I would like to take them out of the dictionary and create a new list with them. But normal indexing doesn’t work with the dictionary


If I remember correctly FilterByBoolMask returns a dictionary with 2 keys “in” and “out”
So to get the “in” list it should be something like Dictionary.ValueAtkey(dictionary, “in”)

1 Like

you can try this
OUT = filtered_dic.get(“out”), filtered_dic.get(“in”)