Page MenuHome

Box Lasso and Circle Select Keymap Options for Faces and Edges
Needs ReviewPublic

Authored by Lukas Sneyd (lcas) on Oct 18 2022, 1:34 PM.
Tokens
"Love" token, awarded by Justo."Love" token, awarded by Tetone."Love" token, awarded by Yuro."Love" token, awarded by xorrito."Love" token, awarded by zelfit."Burninate" token, awarded by Hologram."Yellow Medal" token, awarded by duarteframos."Love" token, awarded by rawalanche.

Details

Summary

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.

Diff Detail

Event Timeline

Lukas Sneyd (lcas) requested review of this revision.Oct 18 2022, 1:34 PM
Lukas Sneyd (lcas) created this revision.
Lukas Sneyd (lcas) edited the summary of this revision. (Show Details)

This is great. I have to admit that this is the smartest design of the feature I've seen so far. The idea to take existing Direction modifier into account to implement user-defined selection behavior together with directional selection at once is brilliant.

My only comment would be that perhaps better terminology could be used, like "overlap" or "intersect" instead of "touch". "Enclose" is fine as is, but "Contain" could be nice alternative.

In any case, this is great. Adds directional selection requested by many. Adds select through requested by many, and does so by having minimal impact on UI complexity. Great job!

Just to share my thoughts: I think this actually looks like a nice addition.
Like mentioned in the description, it avoids the complexity and design of the "Select Through" feature while still being compatible with it in the future.
This also very much respects the current design and fits right in.

Making this a keymap preferences makes a lot of sense I believe, since this is not a behavior that the user would customize per session/workspace/tool/etc.
As keymap entry options, this will also work with both active tools and shortcut operators.
But it will of course take a bit of time for someone to change the preference in every box, lasso and circle keymap operator for edit mode ...

The terminology is fine imo, but the term "Default" is a bit ambiguous. Perhaps it's better to go for "Auto", since it implies more that it's not a single behavior but context dependent.
Leaving this option as it is (grayed out) will always mean the default behavior in any keymap option anyway.

I see the directional selection mentioned in the description as unrelated to this patch. The current directional keymap settings don't work that well yet.
That can be a later addition, maybe mentioned in a design task?

Lukas Sneyd (lcas) added a comment.EditedOct 19 2022, 11:17 AM

I'm fine with the names changing, and yeah, 'Default' means nothing if you don't already know what it did before. I like 'Hybrid' more than auto, at least for edges. I think it could be worth having different names for 'Default' edge and face, because they work so differently. Auto/Default face means it cares about X-Ray being on or not. Auto/Default edge means it cares whether you enclose and/or touch an edge. Hybrid Edge and Auto Face? The words mean less the more I think about it either way, but the more descriptive the better.

I will also reduce Circle edge to just 'Touch' and "Enclose'. That may mean some kind of bug report about a missing edge mode for the keymap of circle select, but so would 'Default' and 'Touch' having the exact same tooltip and result.

I'm more reluctant to change the names of 'Touch' and 'Enclose'. Touch could be improved, because touch screens are ubiquitous. The word comes with some baggage that does not necessarilly apply to mesh selection, though you might be using a drawing tablet or a touchscreen computer. Intersect works fine for touch, but I want to avoid confusion with the 'Intersect' selection mode. Enclose is pretty good I think.

I mention directional behaviour because

@Hologram (Hologram) - @Lukas Sneyd (lcas) uploaded a new build...various selection settings.

Personally I would prefer if @Lukas Sneyd (lcas) or @Erik Abrahamsson (erik85) or someone else commandeered this patch and ran with it. I only got involved in order to simplify @Erik Abrahamsson (erik85)'s original patch and to work on the display part of it, in an attempt to keep in play during a time when we were getting lots of feedback that helped steer it. This really needs someone who needs this, uses it, and understands this code.

I assumed the directional stuff in that patch was the same as what was later added in the keymap. I'll have a look around at the differences later. I think the quickest way would be to just apply that patch and see if it feels different. One thing that I both like, and dislike, is how the directional stuff will do a tweak if it doesn't detect the assigned directions. This could expand the utility of drag select, but it needs a little work somewhere to feel right.

Yuro (Yuro) added a subscriber: Yuro (Yuro).

Hi,

what is the target Blender release version for this patch? It has missed 3.4 release and is about to miss 3.5 release.