X-Ray selection experiments build

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.

2 Likes

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

There already are suggestions in this thread. There’s even a working patch that reduces all this nonsense to a single checkbox.

What’s even worse idea than having lots of options is having lots of options toggleable by one more option, because it takes that ugly dump of unnecessary options and even adds one more.

I am getting increasingly fed up with this “there’s nothing wrong with ideas” mentality. There are some ideas that can really kill an effort, such as these giant button control panels. I’d really love for some people in this thread gather their sanity, and create their own “Adding more buttons to blender” thread, instead constantly trying to ruin this one by poisoning the idea of a single toggle by patches with dozens of them.

Every feature of this custom build is opt-in. Want default blender for some specific feature in this build? Don’t change anything.

Wan’t kio’s build? Don’t change anything. The one exception to this, that I can think of anyway, is that you aren’t forced into invisible facedots when select through is enabled and you go into x-ray shading. Want to get feature that back? Make a python macro to keep xray facedots visible when select through is off, and invisible when they are on. Not a big deal.

Want it to be simple? You can make most of these features more simple, and they usually are at their most simple by default. This definitely applies to the “selection filter” stuff. You can also set these things one time, then not mess with it. You won’t have to think about it ever again. I don’t care for the name “selection filter”, but it is what it is until something better comes along. And that is the main point here.

You also have the ability to make things more specific to your way of doing things. But you are not forced to, and the defaults are the same as either real blender or kio’s build.

@ManuelGrad & @Hadriscus I know it looks ridiculous, but this is what it is for 3.2. Some perspective on what it is we are dealing with that may alleviate the initial reaction. This doesn’t mean it won’t change.

Faced with 3 options regarding the selection filter options. I had initially thought it was 4 options, but I forgot wtf #4 was by the time I wrote out the 2nd one :upside_down_face:

  1. Make decisions for you like real blender, with no recourse other than waiting for the dev team to change something for you and hoping it is what you want. For example: got x-ray shading on? You will select by facedot, and like it. Selecting edges? You will use “enclose” or “adaptive” selection, and like it. Want it to do something else? Go pound sand, kick rocks, and ask for somebody on the team to care enough to fix every last detail of it to your liking.

  2. Remove “Enclosed” selection of faces and “Touch” selection of edges. This would simplifiy everything to the point that only 1 checkbox is needed. X-Ray facedots. The problem with this is enclosed faces is useful, I’m not getting rid of it just because.

  3. Leave it like it was until this build. A couple checkboxes for face, and one for edge. The checkboxes for face are the issue. To get “enclose” face, you have to turn off “x-ray facedots” if you are in x-ray shading with visibile facedots. This can get confusing, so now it is spelled out for you. Not as clean or pretty, but idgaf. I will always go for the potiential for less questions and more functionality/flexibility over “it just works.” It just works usually means tricking it into doing what you want.

Always open to something new.

@LudvikKoutny
Nobody is killing anything, and nobody cares how fed up you are. You are free to do whatever you want. Use whatever patch, make your own, or change a few lines of sombody elses. Enough drama and accusations from you at every opportunity, about the same things that have been explained to you, over and over.

One more time explaining. I am giving you more options, most of them are not being considered for official blender. I never planned on submitting anything, but was asked several times, so I did. It may lead somewhere, or not. It is fun for me to do, and may help somebody a little bit. None of these things are that important, or deal breakers, but I like them to varying degrees. At the same time, I would not want to rely on someone else to fix things for me, especially when it is relatively easy. If I can do this, so can anybody else. Give it a shot, you will find the time was worth spending. Especially for select through, kio did all the hard work.

3 Likes

You should be proud of all the work you’ve accomplished here!

Is there any technical reason for Near Face not having a Center option? It seems a bit inconsistent for X-Ray Face and Select Through Face to both allow it but Near Face only having 2 out of 3 ‘types’ to choose from (only Touch or Enclosed).

-edit- I’m also a bit confused about the Circle modes. In X-Ray and in Select Through you can change it to Center or Touch but in ‘default’ selection it’s always Touch? That also seems inconsistent; if you can do Center in two modes (X-Ray, Select Through) then my expectation would be to be able to choose Center in the third mode (default or Near Face or whatever you’d like to call it) as well.

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 ?

This is something I don’t know about but if it’s a thing where sharing files between this build and normal blender is a problem I will fix. Tell me more about this or link me somewhere.

Thanks. Blender does not do face center selection outside of x-ray. I have looked at adding center face to near select a few times but haven’t been able to figure this out. Nobody else seems interested in it until now, and I was wanting it for consistency and the possibility of its usefulness.

Same thing for circle select. Blender doesn’t have anything for enclosing edges or faces with it. I imagine it could be added but haven’t looked into it. So the combination of those two things means that circle select only has 1 option in 1 context, but this context of x-ray/select through has some more flexibility if needed.

By default, blender will do face center select in x-ray. By default, kio’s select through build will do “touch” for everything. Now you have the choice of changing this, and also keeping the two things separated from each other if needed. Meaning if you want to select through by area, and also need to go into x-ray (with select through off) and want circle to select by facedot, you won’t have to do anything besides turn off select through. You wouldn’t need to go into the mesh filter options and click different stuff.

Beyond this, you also have the ability to make things very simple and decided for you. Turn off select through filter, and it will just use x-ray face and edge filter. Turn off circle filter (either one or both of them), and it will just use x-ray filter, or the select through filter if select through is on and the select through filter is enabled.