Decoupling x-ray and limit selection to visible

Yeah it works in 2.83, I just want to make it a little more convenient.

At the moment you have to go into tool settings and click it on and off. Once I figure out how (or someone shows me how) to add that part into the keymap, we’d be able to map it to whatever we want.

To get it working just go through all the scripts at the end of that link
https://developer.blender.org/D6322

I found it easier by clicking the ‘view options’ and choosing ‘view standalone’

It will show you each script and where it’s located. The original is on the left, and the new one on the right. Green stuff on the right is additions, red stuff on the left is subtractions. Just have that one change to the iterators script that I pointed out.

Everything else is fine, but most of it is on different lines.

Best I can think of right now is to make a custom operator in python that basically just “clicks” that checkbox for you, but I was thinking more along the lines of having it in the keymap where you can map it to a modifier the same way you do the different modes like extend, subtract, intersect, etc

wm_operator_props.c
looks promising

Yeah, sure enough, adding that will put a “select through” checkbox under “wait for input” but at the moment it doesn’t actually do anything. Now to figure out where to put stuff so it connects up with it like it should.

Ok so the guy who actually did all the work on this says
“The setting itself is setup as a toolsetting and not as an operator property, mostly because it was easier for me to access it in the draw code (needed do decide if we draw the facedots in xray mode).”

I’m noticing stuff saying
if (blablabla)… ts->mesh_select_through

So yeah this will probably require some actual work. Going to go through this and hope for the best. Not expecting much though honestly, don’t know much about this stuff.

wm_operator_props.c
this is where you can add a select through property in
void WM_operator_properties_border

under wait for input

prop = RNA_def_boolean(ot->srna, “mesh_select_through”, true, “Select Through”, “”);
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);

it will add a checkbox for select through in the keymap, where I want it to be, but it needs more to do stuff.

I think it will work like I want if I make it check for this property in the relevant parts of view3d_select.c where it currently checks for ts->mesh_select_through (the tool setting of select through)

I don’t know how to do that. How to make something check for a property in another script? I wish there was something like a cheatsheet for doing this. You know, what magic words to say and which Include stuff to throw at it. Going to fumble around some and figure it out one way or another. How hard could it be? :roll_eyes:

I rarely ever need it to click it off, so I don’t mind not having a keymap for now. If you made this work with the official 2.83 LTS release, could you please upload the build somewhere like I did to DB, so that others (including myself) can get this more easily?

I’m joining and supporting this too! I don’t understand why having “face dots selection” and “select through” as an option would harm Blender: also right-click select was a die-hard design choice, still we had the option to change it, and with the new implementation in 2.8, it actually became a default option. This is not for saying that we should change what Blender consider its strenghts, but giving the possibility to the user to choose is one of the most valuable things in software.

If on one hand face dot selection can be more precise and accurate, on the other hand it’s a quite rigid and restrictive way of selection, and ultimately slows down the modelling process: how many times did you have to click again on a face that you assumed you selected, because you clicked too far from the center?

Regarding “Select throught”, there are many cases, especially when modelling in ortographic views, where the user just needs to quicly select an amount of vertices or edges that are on the same axis: as it has been noted previously, these are cases where the user knows its model, therefore knows also how to obtain a specific selection result without the need of visual indication.

6 Likes

That should be good, only testing was confirm that select through is there and cuda/optix are in system options. So let me know if anything is weird or missing.

Getting closer with the keymap, it builds, doesn’t crash, but it thinks it’s on regardless. So something funny with the checking if it’s true/false in the keymap. Few more days I’m thinking. I wasn’t expecting much the other day, and it’s what I thought. Not just a copy/paste and it works, gotta look around at different stuff, trial and error. Thanks to jesterKing I am using a debugger now, at least with my learn-on-the-fly understanding of what’s going on.

1 Like

Thanks for uploading this. I only briefly opened it up and did a few selections on a primitive.

1-Seems to be working alright - am i correct in saying that face/edge centers has been turned off too when in XRay mode?

2-The .7z you uploaded has a lot of things inside. If I only want to have the necessary things to run this executable, I can just extract the “Release” folder (root>bin>Release), correct?

Blender 2.83.1 - Select Through Keymap with Xray Facedots Tool Setting

Ok here’s a link to the weird version as described below. Might be useful so I put it up there. Going to go through and get rid of whatever isn’t needed for the keymap to function. Will update when it’s done. Got rid of the obnoxious ‘I’m a dropbox link’ so I can see if anybody is even checking these builds out.

old stuff below

If it’s acting different than before as far as face and edge centers I’ll go back through it again. Maybe missed something when setting it back to what it was before I started messing with it.

And yeah I tried extracting bin/release by itself and it works fine. I just assumed all of it was needed.

Ok I went through it from scratch and see a difference. In the weird one I don’t get facedots in xray when disabling select_through.

In the one I just did, facedots will show in xray if select_through is off. They will disappear when you turn select_through on. I’ll reupload (without all the solution stuff it spits out thanks for making me aware of that btw) and update the link in my earlier post.

Got everything working with the keymap. I left the Toolsetting for Select Through there, and renamed it Xray Face Dots because it still functions as a weird halfway version of facedots. I’ll post a build with this feature for anybody that wants to see what it’s like. Don’t care for face dots at all personally, but if you want to see facedots in xray view but not in normal view, I guess it’s useful to not have to go back and forth turning them on/off all the time. Could be written to do it the other way around, or have both options in there. The issue I have with it, at least the way it’s written right now, is it overrides the Overlay option for Face Centers, so it could definitely be annoying if you forget that you need to go into either box, circle, or lasso select tool options to turn the ‘feature’ off.

Anyways, the main point. There’s a checkbox in the keymap for box, lasso, and circle select called ‘Mesh Select Through’. It’s on by default. What I did this for was the ability to either select visible or select through without turning things on and off in Tool Settings. I add another set of keymap items for box circle and lasso select. Personally using alt, alt-ctrl, and alt-shift for a Select-Through version of the default Select-Visible. Both are at your disposal all the time, just move your thumb over to the alt key, assuming you don’t have that mapped to something else already.

The idea is it’s up to you. I’m sure the real Blender devs will figure all this out eventually, and maybe even let us know any improvements / stability issues that should be done with this set of modifications. In the meantime, I’ll build two versions, one with the weird facedots toolsetting, and one with just whats needed to get the keymap.

Let me know any of any issues. I’ll update everything for 2.83.2 and 2.83.3 when they happen.

4 Likes

Adding my voice to the requests to make select through/select visible only toggle option. I’ve been using Blender since 2.8 beta, but come from 3ds Max background. 9 times out of 10 I need to select through geometry, so modeling process becomes this weird dance of toggling x-ray on and off constantly. Sometimes I forget that non-visible verts are not selectable and only notice the mistake later, which only adds more stupid work.
I understand that there are different points of view on this matter, and there is an opposing camp. That’s why it should be togglable or customizable, like right or left click select.

Topic of those weird center dots in x-ray mode was also raised in this discussion, that I would also very very much prefer to be able to select all polygons that are touched by the selection box/lasso instead of having to aim for the dots. Other 3d modeling packages usually solve this issue by adding options like “select only polys that are entirely inside selection bounds” or “select everything that touches the bounds” to the select tool.

And a bit off-topic, but also I very much miss Max’s logic of making only selected object semi-transparent when using x-ray. Extremely useful when fitting modular pieces together, or when needing reference objects, like during retopo.

5 Likes

The build I made in the post above lets you select faces without touching the dots. At least in box/circle/lasso.

Trying to get an idea for single click somewhere on the face to select it, that isn’t a facedot. But it’s one of those things where I keep asking myself “Why would I even be in xray mode, trying to single-click select a face on the other side of my mesh?” I’d either turn off xray and rotate camera to the other side, or deal with facedots.

Also I take it back as far as that one being ‘weird’ with the Xray Facedots Tool Setting. I forgot that normal Blender actually forces them on you when going into xray. So basically a happy accident/leftover from the toolsettings version where you can at least turn them off when you want.

I don’t like the placement of it in Tool Settings. I’ll see about putting it into overlay dropdown or something more accessible than the tool settings of a specific set of selection tools.

I’m curious how hard it would be to figure out Xray for active object only. No idea where to do that but I feel obligated to check it out. Never would have thought somebody had already gotten Select-Through working and I could get it into keymap. Shoutout to @kio thanks a million

When I’m all done messing around I’m planning on making a thread with some videos that will walk people through the process of building blender, and how to modify the source. Stuff I’ve changed (with a lot of help) is cursor appearance, single-click selection radius, add an alternative camera zoom speed, turning off header highlights, making custom icons and gui layouts, repeat history that just invokes the tool rather than doing every action, modify these select through scripts, and probably something else I’m forgetting. That way people can just do it themselves exactly the way they want without relying on someone else building it for them. Plus I get a bit in return, people can tell me how wrong I’m doing stuff and I can get some tips on other things I can do.

6 Likes

Why is this still not addressed? It’s one of the longest feature request threads of this forum section, and 2.90 is around the corner, yet silence everywhere. I’ve been using Blender for almost 3 years now and I am still not near the efficiency of my previous modeling software simply because of this solitary issue.

It’s just an incredible source of frustration on daily basis. Constantly playing the Find Waldo game with face dots for each face if I want to select them, and pressing myself to death with Xray button toggle because I want to see the object I am working on clearly but be able to select through at the same time. Add the horror of the selection method constantly changing between face are and face dots and you have perfect conditions for hell. Satan himself would be jealous.

This is a prime example of a single unfixed design flaw can turn someones daily joy of work into daily misery.

6 Likes

I did not notice the link with the compiled patch from you. Thank you so much man! You’ve saved my sanity! I no longer have to spend ages wrangling the xray and changing selection in face an edge mode. I can finally model quickly and do simple things like this knowing that my selection will always be reliable and I don’t have to press anything:

It’s still quite shocking such basic things are impossible to do in vanilla Blender.

It’s just so much fun being able to do absolutely essential modeling tasks fluidly and seamlessly without constantly mis-selecting stuff, squiting to find positions of face dots before actually selecting faces or having to pick between being able to select or being able to see my model cleanly without transparent overlay:

Seriously. This just goes to show what a BS nonsense the “you can only select what you see” mantra is.

7 Likes

Yep. Just tried the build above and that is the version I’ll be using for the forseeable future, until this issue gets addressed. Night and day difference honestly even on a simple sphere.

You’re welcome, and @kio did the real work I just changed it to work with the keymap.

Here’s an updated build:
2.83.3beta Select Through Keymap Xray Facedot Overlay

Only difference in this build is the xray facedots is now in the overlay settings inside viewport rather than a toolsetting. That and I wanted to update for 2.83.2 when it happened. Right now splash says 2.83.3 beta so I guess I missed it, but that’ll have to do. Pretty cool how it will show that it isn’t the release build but a modified version.

Check it out, the way I put xray facedots in the Overlay Settings could use some fine tuning I’m sure, but it’s pretty minor thing that I’m not even sure I would ever use.

Wanted to get some stuff in this one for active object xray, like @Tanagashi suggested, but I’m still figuring that one out. Probably shelve that idea for a bit and get some basic understanding of C & Python because at the moment I’m just kinda scratching my head wondering why stuff doesn’t work right :thinking:

Going to check out Youtube for C and Python courses, and in the meantime get started with some kind of thread and videos about how I’ve done things for anybody interested.

2 Likes

Thanks again. I am confused though. This is 2.83.3b, right? Since I have to do an actual work I really can’t afford to rely on beta versions, even for minor releases. Will you be making 2.83.3 build when it’s out of beta so I can check back here? :slight_smile: Thanks!

1 Like

Yeah I’ll update it when the final release happens, this is my way of following through with what I’d said about updating it for 2.83.2. It’s all under the 2.83 release branch so I don’t know if there is a way to actually build for 2.83.2. Didn’t update until earlier today, 2.83.2 said it was planned for the day before, so maybe there was some small window where the splash said 2.82.2?

I’m gonna see how you update this
https://developer.blender.org/D6322
so people can see exactly what’s going on, maybe help me improve any issues with it. Dunno what the etiquette or whatever is for doing this when I didn’t start it, and it says “abandoned”

1 Like

I think you mean @kio Kio, not me :slight_smile: Kio made the patch. I just complained a lot to push him to do it :smiley:

I am also a bit confused about your recent post on the developers portal. You mention something about the keymap, how you use this along with the old mode using keymap bindings. I don’t think it should ever be designed that way, since it’d just occupy obscene amount of different hotkey combinations. There should be just one global switch which toggles if you are using select through or not. That switch is already there, but it also changes selection mode to face dots and enables Xray in vanilla Blender.

But maybe I just misunderstood what you mean. My point is that the way 2.83.1 version you compiled a few posts above is working exactly the way I need, so I just hope that won’t change.

Anyway, the bottom line is that face dots are completely pointless as a simple display thing if they are not accompanied by a change in selection methodology (that faces are selected by encapsulation of face dots instead of intersection of the face area). In the same manner, face dots are completely useless without “select through” mode as when you are not selecting through, face dots just make selection worse and don’t add anything in reward.

So ultimately, face dots need to be a sub-mode of the select through, where you can use face dots with select through enabled, but it should be impossible to use face dots without select through disabled. This unfortunately adds another layer of complexity, because in pure select through mode, Xray display (transparency) should be decoupled from the select through toggle, but in case of face dots, it should be tied to the face dots select through mode as face dots are pretty much useless without seeing through the mesh.

IMHO face dots should just die, but other people don’t share the same idea, so unfortunately the tons of corner cases they introduce need to be sanitized one by one :frowning:

EDIT: So using the 2.83.1 version of your built, there are some oddities:

  • The Xray face dots mode of the select tool actually makes sense in theory, as it enables face dots but ONLY in Xray mode, which is perfect. There’s no point of having them without Xray.
  • The first problem is that once they are enabled, they are still not used for selection.
  • Second, big problem is there now doesn’t seem to be any way to actually turn select through OFF. So if one wants to select only visible faces, it’s not a possibility.

Solution to that would be following design:

  • Select through should be a top level switch. It probably should not be part of the select tool specifically.
  • Face dots switch should be child switch of select through. It should not be possible to have face dots enabled while select through is disabled.
  • Enabling face dots should force Xray ON, since there’s no point of using face dots when not seeing faces and their dots on the back of the mesh.

This would give us following options:

  • Being able to select only visible faces Xray OFF
  • Being able to select only visible faces with Xray ON
  • Being able to select through with Xray OFF
  • Being able to select through with Xray ON
  • Being able to select through using Face Dots with Xray ON
1 Like

Thanks, I didn’t mean you, @LudvikKoutny, or anyone specifically. I was just speaking casually. What I meant was “I’m going to see how one would update this”.

Don’t worry about the keymap, or it changing from the way it is working in the build you are using. I made it that way from the start for convenience for myself and anybody who wants access to both modes without needing to click on something every time.

All I did was make it where it is on by default. That way, anybody trying out the build will just see it in action instead of me having to explain, “OK, now before you start, go into the keymap and blalbalba… then five minutes later you will finally get to see what’s different.”

Here’s what I’ve done, just go into they keymap and add 1 entry to box select to see what I’m talking about.

Keymap->3D View->Mesh->3D View Tool:Select Box

Click Add new, and expand that “none” entry. Where it says “none” again right below that, change the name to “view3d.select_box”.

Change where it says “Keyboard” to “Tweak” and pick a modifier that isn’t used (for the default keymap ALT is available)

You’ll see a checkbox under the usual “Wait for input” that says “Mesh Select Through” UN-check it

Go do something, you can select-through like you want, but if you ever need to select visible, you can just hold alt and drag.

If you’ve managed to map ALT, CTRL, SHIFT, and all the others for box select already I guess you’d have to figure something out. Pick whatever you want, and that’s the point. It’s up to the user. If people really want both a keymap and a tool setting somewhere it’s probably possible but I don’t really see how it’s going to make sense in two spots.

Here’s a screenshot, just 3 more entries to get Select-Visible with New, Extend, and Subtract selections. Not necessary unless you want both, can just edit the existing keymap entries to match whether you want to always select through or select visible.

Face dots are a weird one, not sure what to do with them. Don’t really like them either but don’t know anything better. They can be useful in different contexts so people who like them can have them, people who don’t can turn them off entirely, or xray only.

Like you’ve noticed the implementation and all that needs a lot of work. I just don’t know how to get all of that done. The most important thing is for it to work for people who like them still. Turning them off in xray is just a supplementary thing to do.

Turning select-through off in xray mode doesn’t work right now, because if you can “see” the component, it will select it. So I dunno what to do about that, or if it was ever a thing, where you can select near faces only even though “hidden” ones are visible behind it.

Going to check it out of course, kinda fun, learning a bit (I hope) while figuring stuff like that out.

2 Likes

Got a new build
Blender 2.83.3b Select Through Keymap Override

Has some new features as requested from over here:
https://developer.blender.org/T73479

What’s new:
I have a button in the header next to xray for toggling Select Through, using the icon for OBJECT_HIDDEN as a placeholder.

On that Select Through button there’s a dropdown with one checkbox called ‘Keymap Override’. It gives people like me the convenience of having select through in the keymap, while giving everyone else the button option.

Xray Facedots has been cleaned up. 1 checkbox for solid and 1 for xray.

Select Through can be disabled in Xray now. Pretty sure that wasn’t the way it was before. This is a consequence/bonus of having both keymap and a header button to control Select Through. Or at least the way I implemented this behaviour made it happen unintentionally. It seems that Selection and Xray have been even further “Decoupled” to borrow from the thread title. Whether this is something people are wanting is something I’m interested in hearing

Haven’t done anything for Area/Facedot selection options yet. Will look into it. No promises of course, not sure where that takes place, but I’m pretty sure that something @kio originally did has an effect because you can select by area in xray. In the official build you can only select by facedots in xray.

Check it out and let me know

By the way, I think I forgot to add circle and lasso functionality with the previous build. Found that out when testing this latest one before doing a final compile.

1 Like

This one is really weird. Select through doesn’t work at all. Non xray mode shows face numbers intead of face dots. Select through itself is nowhere to be found. Sometimes it select visible faces, other times it doesn’t. To me, this is just completely broken build.

In general, I am very disappointed about this direction. The best way to kill this patch and make sure it never happens is to come up with complicated UI. The main reason developers are reluctant to add is it more complex UI, yet what you are describing seems like an extreme complication of something otherwise extremely simple.

Please don’t submit this as a patch. It will do way more harm than good in this state.

In fact, best features are those that remove buttons, instead of adding them. It’d be great if this was case even here, but unfortunately there’s still a large group of people who fail to realize how much time they are wasting with face dots, so they unfortunately have to stay.

I am posting again the UI mockup I’ve posted like 1000 times already:
image

ONLY change from the UI standpoint compared to vanilla blender should be that the Xray button gains a popover with a single bool checkbox under it. That is all. That’s how much UI should complicate. No other buttons or toggles should be added anywhere in the UI, that includes tool properties or keymap operator properties.

The rest needs to happen on the code level:

  • The Xray button (Two overlapping squares) changes meaning from “Toggle X-Ray” to “Toggle select through”.

  • The sub option bool checkbox, named X-Ray selection toggles Face Dot display, Face Dot based selection (instead of face area selection) and Xray transparency (mesh transparency)

  • When “Toggle select through” header button is disabled, the X-Ray selection checkbox is frozen and can not be enabled (No sense to have face dots when not selecting occluded faces)

  • When “Toggle select through” header button is enabled, but X-Ray selection checkbox is disabled, we have the regular select through we all want. The mesh is not drawn transparent, there are no face dots, and faces are selected by face area.

  • When When “Toggle select through” header button is enabled, and X-Ray selection checkbox is enabled as well, we get current legacy behavior. The same way it works in vanilla Blender when Xray is enabled. The important beauty of this is we can have what we want without changing default behavior of Blender, which makes this patch very easy to accept. Only thing one who desires select through workflow needs to do is to uncheck that one child checkbox in the popover.

We can’t afford to burden people who just want to use the feature without having read 150 post long thread with complicated UI. Also, no parts of this should be in tool, even in keymap settings of the tools. Simply because it would make it extremely hard to find for new and even average users.

I’ve been loosely following this debate here, and I agree with your sentiment here: The simpler the UI change, the better.

However, I think your proposal has a major drawback, as it changes a functionality of an existing feature. The current x-ray see-through button would become a selection mode button. I for example use this x-ray feature for other things besides selecting (e.g. aligning things visually when there’s stuff obstructing the view. Sometimes the x-ray is more clear than the wireframe mode).

I’d have no problems living with that change, but I’m just saying that you’d have even better chances of getting the patch accepted if it didn’t change existing functionality/workflows.

That is just misunderstanding. The problem is that right now, that button is broken, as it mashes two completely different things together. Selection method and viewport display drawing.

But the Xray display drawing mode itself will of course remain independently available on it’s original location here:

What people often don’t realize that the header button acts as a combo of two things. As a shortcut to enable this xray drawing property which is also found in separate place in the UI as displayed above, and also selection method, which is, jarringly enough, not found anywhere else in the UI.

In my proposal, this Xray viewport shading option would be availble in the Viewport Shading popover in the same way it’s been up until now, with the exception that enabling Xray mode sub-option of the select through header button would also force Xray viewport shading on.

So if you have Xray viewport shading off, and you enable Xray selection mode (Should perhaps be called Face Dot selection mode for more clarity) it would also automatically enable Xray viewport shading. And if you then disabled Face Dot mode, it would turn the Xray shading back off.

If you had Xray viewport shading on, and enabled Face Dot mode, it would not change anything, and if you then disabled Face Dot mode, it would disable Face Dot based selection but keep Xray on the way you had it before.

I hope this makes sense.