Fix #142285: 3D cursor placement ignores unselectable objects
This was caused by 3dfec1ff73
which introduce the new behavior. This was to fix workflows
using a lot of semi-transparent objects which made nagivation
difficult.
This patch first roll back to the previous behavior: The
unselectable object will affect depth-aware operators.
This patch introduces a new visibility property to remove
the influence of objects in all depth picking operations
and selection operations. However the object is still
selectable through non-drawing selection operators
(e.g. select by material) and through the outliner.
This is to adress the aforementionned navigation issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/146706
This commit is contained in:
committed by
Clément Foucault
parent
e2dc63c5de
commit
6b0f57facf
@@ -1089,6 +1089,10 @@ bool Instance::object_needs_prepass(const ObjectRef &ob_ref, bool in_paint_mode)
|
||||
}
|
||||
|
||||
if (resources.is_selection() || state.is_depth_only_drawing) {
|
||||
if (ob_ref.object->visibility_flag & OB_HIDE_SURFACE_PICK) {
|
||||
/* Special flag to avoid surfaces to contribute to depth picking and selection. */
|
||||
return false;
|
||||
}
|
||||
/* Selection and depth picking always need a prepass.
|
||||
* Note that depth writing and depth test might be disable for certain selection mode. */
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user