I'm trying to mimic the move tool's ability to select a layer by clicking them on canvas.
I tried to record this using scriptlistener plugin but I don't find any coordinate data in it.
The only one solution that I see now is making a selection of one pixel on canvas and then iterate throw all layers a function (from top to bottom) that will intersect selected pixel with selection of layer and if selection is still there then this is a desired layer.