Page MenuHome

Viewport X-Ray is influencing snapping even in material mode
Closed, ResolvedPublic

Description

Blender Version
Broken: version: 3.0.0 Release Candidate, branch: master, commit date: 2021-11-29 10:04, hash: rBb31250feba4c
Worked: Not sure how to reproduce this without the asset browser in 3.0.

Short description of error
In material and rendered modes the X-Ray option is still affecting the snapping, even though it shows as disabled in the UI.

Exact steps for others to reproduce the error
Try to drag the cube from the asset browser into the scene. It doesn't snap to the floor properly.

Event Timeline

Note: There can be a separate discussion as to which fallback to have for X-Ray mode. But this is orthogonal to this bug. The main issue here is that an option that is disabled in the UI is influencing Blender in any way (and it shouldn't).

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Nov 29 2021, 3:55 PM

I can confirm the problem.
The general occlusion test ()ignoring faces in x-ray) is intended only for snap in edit mode (for Bmesh).
The occlusion test in other cases only checks whether the "viewport display" of the object is wire or boundbox.

The dragdrop snap should be done to final geometry and not bmesh.