Decoupling x-ray and limit selection to visible


What I’m trying to show in video:

  1. What select all edges does. Edge select in solid shading makes you fully enclose an edge to select it. Fortunately this was just a simple bool check since the less exclusive edge select is what you get in xray. It only affects solid shading / select near. It’s kinda like select faces by area, but it happens in the opposite mode: select faces by facedot only happens in xray / select through.

  2. Show how the icon / operator changes for autmatic xray, select through keymap, and select through button. For now I’m using the placeholder stuff for auto xray and sthru button but I plan on using the two icons @AlexeyAdamitsky made to distinguish those from the normal xray button. Sthru keymap doesn’t need a button to do anything so I am leaving the xray button there.

  3. Show the xray shortcut and amount taken from shader options dropdown. I figured it makes sense to put this here, plus you have access to it in the modes that change the header button to something else

Let me know what you think. I know there was never a vote for auto xray and select all edges, but I think they are worth including. At the moment I am using one operator there that changes between xray, toggle select through, and toggle auto xray depending what mode it is in. The problem with this is you can’t dynamically change the tooltip for the header button to reflect what it is going to do.

I think I will just change the operator itself because it makes more sense to have a useful tooltip than share one keyboard shortcut for something that nobody has any real need to switch between. Once you figure out what xray mode you like, I don’t see any reason to switch between them on the fly to the point that sharing a single operator would be worth sacrificing a more descriptive tooltip. I guess when I’m thinking about it that way, there isn’t a whole lot of reason to switch what the icon itself looks like either. Still, I like the idea of the button’s icon showing you the mode it is in, maybe with the exception of select through keymap for the sake of confusion, since it would essentially be an xray button that looks different.

Automatic xray works with box, lasso, and circle, and it doesn’t shut off xray if you are already in that shading mode. I’ll make a build later so you guys can try it, once I get the new icons figured out and if there aren’t any new developments.

3 Likes