Page MenuHome

Mesh: Select through
Needs ReviewPublic

Authored by Benjamin Sauder (kioku) on Thu, Nov 28, 9:09 AM.
Tags
None
Tokens
"Love" token, awarded by greyoak."Love" token, awarded by Zino."Like" token, awarded by pascalandr."Love" token, awarded by radcapricorn."Love" token, awarded by rawalanche."Burninate" token, awarded by EitanSomething."Love" token, awarded by phaseIV."Love" token, awarded by thecavelap."Love" token, awarded by nikand."Love" token, awarded by franMarz."Love" token, awarded by symstract."Love" token, awarded by Oskar."Love" token, awarded by Zuorion."Love" token, awarded by Peps."Party Time" token, awarded by Debuk."100" token, awarded by Polygreen."Like" token, awarded by xrg.

Details

Reviewers
Campbell Barton (campbellbarton)
Group Reviewers
Modeling
Summary

What:
This patch implements a new option for mesh selection tools called select through. It’s availiable in box, paint and lasso selection tools.
While this setting is enabled the user can select occluded mesh elements without the need to switch to xray mode. It does not change any existing behaviours in blender as far as I know.

Why:
The main motivation to add such a feature is, that this is the default selection behaviour in many 3d applications. That means I looked at 3ds max, maya and houdini... there might be more. So it’s always quite a surprise that such a basic thing is absent from blender. Selecting this way the user is not distracted by the need to switch display modes to do mundane selections.

Discussion about this can be found here: https://devtalk.blender.org/t/decoupling-x-ray-and-limit-selection-to-visible/3498

Quick example: selecting the cap of a cylinder is very easy to do this way, as its clear where the vertices are there is no need to switch to a different view mode. While this is a bit of an artifical example - it happens quite often that the model at hand is actually pretty simple and the user can predict whats on the 'other' side just fine.

Here I made a … lengthy ..demonstration video of this new feature showing the various selection modes/tools (sorry boring box models):

Remarks:

  • In edge mode, I set it up such that it always selects partial edges, the preference for full edges felt very strange/wrong to me. On a sidenote - while modeling I was always irritated by this, I just couldn’t put my finger on it, selections just felt ‘wrong’ sometimes. I was quite surprised by what the code was doing there…
  • In polygon mode, polygons are used to determine the selection instead of the face centers.

Implementation:
The code follows the existing design and mostly uses the existing code to test the selections. The only real addition is a new view3d_iterator function to generate the screen coordinates of all the polygons. These are then used to determine face selection.

I’m not sure if my approach is sufficent, as it’s a pretty brute force problem, there might be better solutions. The other tests are implemented in a very simliar fashion, so I thought it would be okay to try it this way. None the less from all of the existing geometry tests this is the heaviest.

I did not look into alternative approaches here, as I don't know enough about parallel processing / gpu compute etc.

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).

Im still not too savvy on this C thing, any feedback is welcome :) and thanks for your time.

Diff Detail

Event Timeline

Really good ! ....but it would be nice if you were also able to see the selection of the back faces through the mesh without having to go in X-ray mode

Really good ! ....but it would be nice if you were also able to see the selection of the back faces through the mesh without having to go in X-ray mode

While such a feature might be usefull - it is not directly related to this patch. So this has to be discuessed elsewhere.

updated the patch to fix some issue from the recent overlay refactor.

Benjamin Sauder (kioku) edited the summary of this revision. (Show Details)Wed, Dec 4, 9:42 PM

Really good ! ....but it would be nice if you were also able to see the selection of the back faces through the mesh without having to go in X-ray mode

While such a feature might be usefull - it is not directly related to this patch. So this has to be discuessed elsewhere.

Yes, it’s not related to this patch but I also believe that this feature is only useful if you can see your selection through the mesh. It is pretty bad if you can select through the mesh without seeing what you have selected...I’d rather switch to X-ray mode so I see what’s going on.