Depth Filtering for masking?

is there a way to use the depth filtering from paint also for masking?
Convert paint to mask or so?

New version will give you an workaround.
There will be a layer to mask option.
In short:
In 1.66 you can paint on a layer with depth filtering.
Then, in layer menu, choose mask symbol right to color.