From 0d3914f64639cb2896236c93b08061903b7cd5cd Mon Sep 17 00:00:00 2001 From: guishe Date: Fri, 28 Apr 2023 10:37:16 -0600 Subject: [PATCH] Fix #107411: Non-visible objects in the viewport affect selection collusion When using edit mode with a mesh, if you have the retopology overlay active, the selection of vertices, edges, or faces is occluded by the other objects. However, if local view is on or collections with objects are hidden, these non-visible objects can occlude the selection. This patch discards objects that are not visible in the viewport so they do not occlude selection. --- source/blender/draw/intern/draw_manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index ae874e44414..c425e025955 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -2792,6 +2792,9 @@ void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, cons /* Only background (non-edit) objects are used for occlusion. */ continue; } + if (!BKE_object_is_visible_in_viewport(v3d, ob)) { + continue; + } drw_engines_cache_populate(ob); } DEG_OBJECT_ITER_END; -- 2.30.2