X-Ray selection experiments build

Topic split off from Decoupling x-ray and limit selection to visible.


A lot has been made out of this when we’d all be just fine with a closed source Blender. But it aint like that so here’s a new custom build.
[BUILD] sthru 32 w/ extra stuff
[DIFF] sthru32 w/ extra stuff

This one is a little different because it also has the other stuff I add. I figured why not, it’s all optional. It saves me a little time as well, don’t have to go through and clean out every non-select through feature from my personal build, or apply the same select through fixes twice.

The aim is to preserve default blender behaviour while offering a high degree of customization and flexibility. Mostly the same as select through 3.1 but presented differently. No extra popovers or a shared xray button. Buttons can be hidden instead. Hiding viewport buttons from toolsettings is a bit wrong but this is not for submission to real blender.

Like the x-ray button, there are multiple properties that are exposed which could be used as a shortcut, but it is better to use the header button instead because it will control all of them contextually.

Toolsettings for Drag Select will appear as needed, the gear next to the two modes will expand to show you more settings. All of the expected behaviour is set as default, if you already have a startup file for 3.2 you can always right click whatever and reset to default, or rename/delete your settings folder to start new. Doing a factory reset does not apply default toolsettings for whatever reason.

  1. Show header button will show/hide the header button for either auto xray or select through. On (meaning the button is visible) by default.

  2. Hide xray button will show/hide the header button for xray. Off (meaning the xray button is visible) by default

  3. Tool synchronization will keep the on/off status of select through and auto xray the same for whichever combination of the 3 tools you wish. They are all on by default, meaning it acts like one button for all 3 with the option of individual control

  4. Keymap control is an optional control method for select through where it will use keymap entry instead of the header button. This offers more flexibility for how you assign it to a shortcut. Off by default

  5. Safety edge makes select through do a select all edges if you are in solid shading. Box and lasso only. On by default.

  6. Xray facedots will select faces by their center in xray the way blender normally works. If you turn off facedots in xray it wont do this though, it will select faces by area unless you turn on enclosed faces. On by default.

  7. Enclosed faces will select faces that are fully inside the selection area, but will be overridden by xray facedots option if you are in xray with facedots visible. So turn that off if you want consistency. Box and lasso only, off by default.

  8. All edges will select all edges touched by the selection area instead of fully enclosed edges. Box and lasso only, off by default

Facedots can be turned off in xray, this operator will toggle them for either solid or xray shading depending which one you’re in

It may appear that nothing has changed as far as header buttons or mouse cursor because it hasn’t been redrawn. You just need to move your mouse in or out of the viewport to redraw everything.

Here’s the other stuff:
Alternate header combines the xray and viewport shading buttons:

Header highlight will change how much the active header will brighten, or disable it at 0 which is what I do

I use a different edit crosshair for my mouse cursor. The regualr one blocks what I want to click on so I made it more open. I’ve tried different things over time, this is what I am using most recently and will probably keep it for a while.

You can adjust the click select radius if you turn this feature on. Bigger or smaller than you’re used to, affects vert, edge, and face.

Adjustable zoom speed and frame select distance. Tooltip for zoom says ‘dolly’ which is probably wrong, I’ll fix that next build if I remember.


These shortcuts you’ll have to add manually if interested.

Some python shortcuts derived from this:
https://github.com/dpdpforlife/QWER
It is pretty neat, you can tweak based on which gizmo is showing. Also has a more convenient way of switching between move, scale, and rotate.

Another python shortcut to toggle between box and lasso, instead of going through circle and tweak as well.

Repeat tool is like repeat last except it just invokes the last operation rather than executing it

3 Likes

Looks interesting.

Not sure about Show/Hide functionality and prefix, usually it is Show/Show Hide/Hide functionality with no prefix, when highlighing means “show”.

Do you have linux builds?

It is general problem of an industry standards implementation - it wasn’t run by people fluent in industry standard software solutions with experience of moving from ISS to Blender, only by people who are a bit familiar with them.
As a result blender has got an imitation of ISS even without solving famous ISS issues, like avoiding cycling between selection modes you mentioned there, and at the cost of heavy unnecessary damage.
(the same thing happens when linux tries to imitate windows interface without understanding the ideas behind it)

For example, the display of facedots in solid mode was broken and remained useless for a year.
As a result of such kind of damage of different functionality our company was completely bulldozered from blender.

I appreciate you looking into issues before offering solutions.

That’s funny, the two buttons do the same thing and are right next to each other, but I didn’t think about how they work opposite from each other. I was looking at it from what is in normal blender, and trying to be more specific about what is different in this build so it was more clear what would happen. But that makes no sense, setting on should = button visible and just say what button it affects.

Just a windows build but the DIFF should work the same if you want to make one. The link has the diff itself with the icon, alt cursor, and a readme. Doing a make icons might be different in linux if there’s no inkscape for linux, but if that’s the case it should be really similar. That or just change the diff a little to use a different icon. There’s like 1 or 2 things keeping me in windows for now, but that may easilly change.

We were close to an acceptable solution but unfortunately it once again turned into a button adding competition :frowning:

There’s two different things being done here by me. This custom build is not intended for real blender. This more complex build is for me, and anyone who wants to use it. The other one, that is simpler, is what we are waiting for some further response on. I just explained how and why I did what I did when I sent that diff off for review. Go read my posts from 10 or 11 days ago if you really didn’t know or just forgot.

Feel free to ask around for more input from the devs if you want, but I think we’re meant to wait for people to have less important things to do and get back to us. I wouldn’t exactly hold my breath though, it is something that was already rejected for what I would call philosophical reasons. Which is understandable, and not a big deal. Otherwise I guess you could discuss, or implement, what could be done to align the concepts of select through with how real blender does things.

Or just use this select through (and other stuff) build, and see what weird or wrong stuff you can find with it.

Tested win version (on my work).
I would like to provide some feedback in case if it is interesting.

  1. Facedots displayed in wire/xray when they are off, but solid mode facedots are on.

So it is not “xray facedots” checkbox, what can be recognized as “display xray facedots”.
It better be named as “select faces by area” checkbox with inverted functionality, since it control only selection type, with no visual impact.

  1. “select faces by area” checkbox should be represented in select through custom setup as well, so you can control selection style by switching SThrough button, the same way it works with with “safety edges” which enforces “All edges” checkbox.

  1. In tweak mode AutoXray and Sthrough buttons are unaccessible, but functionality works if they was turned on in other mode.
  2. Autoxray jammes if selection border has no area.

Hope it was interesting. What do you think about that?

2 Likes

Always interested in feedback and bugs, thanks

  1. X-Ray facedots is named that way to make it shorter but it’s shortness is outweighed by being confusing. Not sure what to do about it but I had a couple different ideas.

At the moment I put it under the “Drag Select” heading to imply that it means “drag select by xray facedots” and gave it a tooltip. But it has the issue where it is easilly mistaken for toggling facedot visibility.

One solution is like you say, just call it “select face area” or similar. Now that there is also an “enclosed faces” option there’s a problem with this being two checkboxes and one has to have priority over the other. Already have this problem with “xray facedots” having priority over “enclosed face”, but at least it is sortof isolated in a specific context of needing to be in xray with facedots visible. A “face area” and “enclosed face” checkbox both existing and being on is a little worse since they both work in either mode regardless of facedot visibility.

To fix that I thought I’d make an operator for each one that will just toggle the other one off when needed, but I can’t put an operator in tool settings. It formats it all weird by putting the operator in that left side area where the headings are, and in the toolsettings panel (not the viewport one) it isn’t even clickable.

So I am thinking I will have a look at some of the other properties like the viewport shading buttons (wire solid material render) and emulating how that works. I could also expand this into some further properties. Have a “solid face” and “xray face” text label that looks like the “tool synchronization” label but with a gear next to it. If you click on the gear it expands and you can choose between area/enclosed in solid, and area/enclosed/facedot in xray.

  1. The feedback I got from having the ability to select through by facedot was negative, but I don’t see any reason not to have the option. It makes it more clear what will happen as well.

  2. Besides hiding header buttons I didn’t see any other functionality that would occur outside of box/lasso/circle select. So I put the button visibility stuff inside the viewport->view menu beneath “alternate header”. Is there anything you’ve noticed as far as autoxray, select through, enclosed faces, xray facedot select, or all edges select with tweak?

  3. Fixed this. Finally did it right by having autoxray happen only in gesture_ops instead of also inside view3d_select. This led me to actually checking that additional exit case where the seleciton box isn’t valid. Also cleaned it up by sending a handful of copy-pasted stuff that was spread out among box/lasso/circle into one thing

  1. I am not sure that enclosed faces require attention at this step, since implementing directional selection differentiation mechanics can fix this problem in a better way.
    At the moment it looks like an attempt to add manual selection differentiation mechanics, but in not centralized (dissolved across build) way.

  2. In my opinion adding such an option to select through controls will help to customize select through behaviour in a more flexible way. Select through is usually used with area selection (because occlude geometry covers facedots), while non-select through with manual/auto xray switching mechanics provide facedots acessibility and can be used with facedots selection. I think it is logical to have the ability to force area selection for select through mode.

  3. I think that AX and ST buttons should be active and work in tweak mode the same way they are active in other modes, because you have access to box circle and lasso selections in that mode via hotkeys.
    (Btw, the point of using hotkeys is immediate access, which allow you to quickly alternate them carving complex selections without selection modes switching or cycling - in BCBBC way, where LMB is for selecting and MMB is for deselecting. Such a mechanics also allow to not interrupt your attention from a model)
    This way, I dont see any differentiations between tweak mode and other (box circle lasso) modes that are needed to be hardcoded.

  4. Okay) By the way, I forgot to test that python copypasted stuff, maybe next time.

Thank you for attention.

  1. I am interested in directional control but for now I prefer a property toggle. Even if the (anti)clockwise thing gets figured out by somebody, I’d want a toggle as an option to avoid needing to draw my selection areas a certain way. Enclosed face is the only thing that is fully functional besides. Facedots not available in near select, and face area breaks in through/xray when doing intersect selection mode, with enclosed face being done as a fallback.

  2. It works this way already, where select facedots only cares about 3 things: Are you in xray? Are facedots visible in xray? Is xray facedots toolsetting enabled? AX as implemented will satisfy the being in xray, just for clarity’s sake. But yeah, I will just add the ability to do facedot select in ST mode. It might be useful for some reason but I don’t forsee what right now. It would be the same as safety edge where you could “turn the safety off” so to speak and do something that isn’t exactly expected, but potentially wanted for some reason.

  3. I did it this way to show what isn’t available in circle and also tidy things up in the toolsettings when these options aren’t applicable. Didn’t think about the direct keymap stuff, so I’ll probably just add tweak to the list of things it shows up for. I will say that calling BLC directly isn’t fully realized (header buttons won’t reliably reflect the ST or AX status if they are checking a non-select or non-select-fallback tool that is calling them) but supported because it will work fine despite potentially inaccurate header feedback.

  4. I was just talking about how autoxray is implemented. Gesture_ops calls xray to turn it on/off as needed but it isn’t just a single line you have to set up pointers and other stuff like this:

wmOperatorType *ot = WM_operatortype_find("VIEW3D_OT_toggle_xray", true);
BLI_assert(ot);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &ptr, NULL);
WM_operator_properties_free(&ptr);

So having that copy-pasted 6 times wasn’t the right way to do it, but going back and checking stuff got me to do it better.

As far as python, the gizmo tweak stuff seems alright. Box-lasso toggle I made works ok for what I want it for which is just edit mode. Works fine for uv edit as well, just don’t assign to something like image editor where it will warn you that it doesn’t know what a box or lasso select is. Might work on a filter to eliminate that.

  1. I will just add the ability to do facedot select in ST mode

Hm, wait, thats weird…
From my experience during testing build, ST does not force face area selection, and respects “X ray facedots” checkbox, so there is already the ability to do facedot selection in ST mode if this checkbox is on. Isnt it?
Or am I missing someting?

  1. I will try to explain the issue without making it even more confusing.
    In short, there is no way to
  • make ST mode always use area selection in both Xray and Solid modes, according to classic ST behaviour
  • and make noST mode use facedots selection in Xray, and area selection in Solid, according to Blender defaults behaviour

so switching ST button you always have to switch Xray facedot checkbox as well to achieve such a differentiation, in case if user want to keep Blender default behaviour extended by classic ST mechanics.

If there will be ability to force face area selection for ST (simultaneously, both in Xray and Solid modes), such a differentiation can be achieved, and it will be possible to switch between (and indicate) those modes via single button.
Hope it sounds more clear.

I get what you are saying, and it works that way already, it’s just a little unclear what select through means. ST only happens if you are not in xray to begin with, and that’s the way it has always been. I get the confusion, based on how the 3.1 build had xray “modes” to designate which of the 3 things (default xray, auto xray, or select through header button/keymap) would make use of the space where the default xray header button is. Now in 3.2 the header situation is similar, but different. You can get the same ability to hide buttons you don’t need, but it isn’t all or nothing. It is however you want it where you could have 1, 2, or all 3 of the xray, AX, and ST buttons up there.

If you want ST to use face area all you need to do is not turn on “enclosed face”.
If you want nonST to use facedots you just have keep xray facedots visible, go into xray shading, and leave “xray facedots” enabled.
This is also the default behaviour.

I am going to alter this slightly though in an update that I will put up in about a week. Going give things a little more time to be discovered and posted here if there’s anything else people find.

It will be more of a clear and absolute choice which mesh elements will be used, instead of having to understand that enclosed faces only happen in xray if “xray facedots” is off. Also I just thought about it, I am going to get rid of the “safe edge/face” idea and just give ST its own mesh element section

Aw, so it is supposed that ST influence only Solid mode? That explains a lot.
So it looks like I am missing Xray mode support for ST then, to obtain complete classic ST mechanics…
(In software where ST mechanics is presented, it influence both solid and wire/xray modes, allowing selecting faces in both modes by area)

No, it is just something that is still being confused. Fixing that right now. Kio’s build made it where you had to have ST on to get face area select in x-ray. I have removed this requirement since very early on, if not right away. Same goes for x-ray facedot visibility, if ST was on, xray facedots would disappear. I made both of those things “decoupled” from ST.

You can select by face area in x-ray however you wish. AX, ST, both, or neither. That is why that tool setting “x-ray facedots” exists. Turn it off, you get face area select unless “enclosed faces” is on. That is the only thing that influences face selection other than ST forcing non-facedots when in solid shading, or xray facedots not being visible, or simply not being in xray.

Right now it is not obvious without reading the tooltips, but here is how it works:
If Select X-ray facedots ON, X-ray Facedots VISIBLE, Xray Shading ON - only way to get facedot selection

Then, reagardless of near/through select it checks if “enclosed face” is on, and will do either face area or fully enclosed faces. The one exception to this is face area is broken in through/xray if doing intersect selection and the workaround for making it at least do something requires a swap in/out of edges mode, which means the end result will only be fully enclosed faces.

Going to make this much more clear though, almost done and will show a screenshot later or tomorrow.

2 Likes

Thanks for making a build for 3.2, now I can use it for my daily work.

Also I found a bug - using auto x-ray on a curve objects turns on x-ray shading permanently instead of just while making a selection.

Should have this fixed now, checking it out led to finding this bug
It isn’t something that would be noticed unless you are in a debug build, but pretty neat.

Preview build for 3.21. Its a Lite build of RC, will upload the real thing once release probably. I’d appreciate one more check over things if anybody wants to do it.
[PREVIEW BUILD] 321RC Lite Sthru

Autoxray issues should be cleared up, and changed the way mesh element options are presented. Not as straightforward as 3 checkboxes, but it shouldn’t require as much guessing to figure out what to expect.


Planning on putting these options in a popover next to the vert/edge/face button. I had it all finished and setup inside of toolsettings but theres an issue with that for reasons I don’t understand. The viewport TS works fine, but the side panel one doesn’t work. You can make it show up in there fine, but it has no affect on selection. It has to be defined somewhat differently in python to show up, which may have something to do with it. Either way it isn’t there, but I left it in the viewport TS panel just to show what it could work like. Not much difference whether it is in TS or the popover next to the VEF buttons, so feel free to convince me to keep it in the viewport TS. Being in viewport means there’s no rightclick->reset to default, because for whatever reason that isn’t possible.

So, how does it work? It can be as simple as this:

Or as complex as this:

Near Face will change how near faces are selected by box and lasso. Meaning not in X-Ray, and not Select Through, that’s it. This also means circle will never use this because it only has options for “center” or “touch”

“Touch” means the same thing as what has been reffered to as “area” but I changed the wording so it is the same for face and edge (edges are 1-dimensional and don’t have area). It’s also about as simple as it could be described, touch face or edge with the selection area, and it will select the face or edge. Face “area” is less intuitive.

Enclose means you only select faces that are fully inside the selection area.

X-Ray face is the same as near, but for X-Ray shading. It has a “Center” option, which means select any faces whose center is inside the selection area. It does not care if facedots are visible or not. This goes the same for Select Through. I decided to leave it in your hands what the selection will do. If you want to select by invisible facedots, go for it. If you want to have facedot visibility act as your selection toggle, you can set up a python maco to keep them synced up. Shouldn’t be an issue for you guys though, I don’t think anybody who wants to turn facedots off will want to be selecting by them in any context.

Edge works for edges at all times, with and without X-Ray. “Enclose” is the default way blender does it, meaning adaptive, where it will give you only enclosed edges, or if you don’t fully enclose any edges it will give you any edges you touch with the selection area. “Touch” will give you any edges you touch with the selection area.

By default, “Select Through Filter” will be on. This means you can set a separate filter for select through while maintaining X-Ray Face/Edge. If you turn this off, it will just use X-Ray Face and Edge.

“Circle” and “Circle Select Through FIlter” are both off by default, but are there if you want them. It is like the select through filter but for circle. You can have one or both of them, they are separate things. Circle select options are very limited, face only, and you can select by either Touch or Center in X-Ray and/or Select Through. Otherwise it will use either X-Ray (Enclose will fallback to Touch) or Select Through (Enclose will fallback to Touch) depending on what is applicable.

If you are in X-Ray shading, and have Select Through on, both the filter and have it on (header button is lit up) you will get the Select Through filter behaviour despite select through not actually happening (xray is on there’s nothing in the way to select through anymore).

That is a lot of explanation for something that is meant to be simple to understand, but I wanted to make it as simple or complex as is reasonable. All of that while also maintaining default behaviour of both vanilla blender and select through as it was originally designed. Otherwise you’d be forced to use something more complex than you want, maybe you don’t care if select through or circle has it’s own filter. Or you’d have to deal with whatever decision I make for you regarding what I think you might want, maybe you want circle to use face center and box/lasso to use enclosed faces.

4 Likes

It’s amazing to see everyone in this thread trying hard to solve that issue, everyone that spends his/her free time on improving Blender should be applauded!

But to me, this looks like a nightmare, sorry.
This looks like the most complex solution to a pretty simple problem and would require way too much effort for users to figure out.

5 Likes

Lord have mercy… maybe this is the best way, but it certainly frightens me a bit ! I’d rather have a single way of dealing with this stuff, hardcoded but thought-through all the way, as uncomplicated as it is right now in vanilla, only better

2 Likes

@ManuelGrad @Hadriscus What do you have in mind/ how would you change it? If it’s so simple, then you should be able to make a suggestion ey. :smiley:

But, I think it’s not that difficult. If you want more options, you would have to enable them manually anyways and you’d know what you are looking for. Otherwise, they’d be the same as the short options menu. Most people would leave these at their defaults anyways.

1 Like

Are these stored in preferences ? I wonder if that’s not source of problems for pipeline (sharing of blend files in the same department) if these are defined in the scene. They should be user-level preferences, not tool settings, right ?

1 Like