This patch expands on D9180 and D10525 by @Erik Abrahamsson (erik85) and @Harley Acheson (harley). The directional behaviour introduced by those patches can now be found in the keymap:
So thanks to this great new directional click drag feature, I only needed to add different styles for selecting edges and faces in the keymap for box, lasso, and circle. Whether you want directional behaviour or not, the different selection styles for edge and face are useful.
The 'Touch' select X-Ray faces is from D6322 by @Benjamin Sauder (benjamin.sauder)
Box, lasso, and circle all have the same options. These work the same regardless of X-Ray, with the exception of 'Default' face for all 3 tools, to preserve default Blender selection style where it acts differently based on shading.
Face Style
Default - Like Blender is right now. Select faces that are touched by the selection area in near select / solid shading, and select faces whose center is touched by the selection area in X-Ray
Touch - Select faces that are touched by the selection area
Enclose - Select faces that are fully inside the selection area
Center - Select faces whose center is touched by the selection area
Edge Style
Default - Like Blender is right now. For box and lasso you get hybrid, where it selects enclosed edges, and if it doesn't find anything it will try to do a touch edge select. Circle select does touch edge select
Touch - Select edges that are touched by the selection area. For circle, this is the same as 'Default'
Enclose -- Select edges that are fully inside the selection area
Demos
Box Face
Lasso Face
Circle Face
Box Edge
Lasso Edge
Circle Edge
Everything is working with one exception, intersect faces, and only in X-Ray.
This does not affect circle because it does not do intersect. When an intersect faces in X-Ray happens, I send it to do a center face select as a fallback. Something I've tried to figure out for a while, off and on. Probably not going to be noticed, but would like to know why this happens and fix it. From my time looking around, I think the most likely culprit is
BLI_lasso_is_edge_inside
and
edge_inside_rect
but who knows.



