Fix unreported: Selection of mesh_cage element occluded by the mesh_cage itself.

The right thing is to be occluded by the visible mesh (in the case with modifiers).
This commit is contained in:
Germano Cavalcante 2019-08-01 23:18:44 -03:00
parent 58a2b2dd7e
commit c060a835bb
Notes: blender-bot 2023-12-22 20:14:11 +01:00
Referenced by commit 8f662e84e0, Fix T69716: Can't select geometry hidden by faces created by modifiers
1 changed files with 3 additions and 1 deletions

View File

@ -90,9 +90,10 @@ static void draw_select_id_edit_mesh(SELECTID_StorageList *stl,
BM_mesh_elem_table_ensure(em->bm, BM_VERT | BM_EDGE | BM_FACE);
struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me);
struct GPUBatch *geom_faces;
DRWShadingGroup *face_shgrp;
if (select_mode & SCE_SELECT_FACE) {
geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me);
face_shgrp = DRW_shgroup_create_sub(stl->g_data->shgrp_face_flat);
DRW_shgroup_uniform_int_copy(face_shgrp, "offset", *(int *)&initial_offset);
@ -103,6 +104,7 @@ static void draw_select_id_edit_mesh(SELECTID_StorageList *stl,
*r_face_offset = initial_offset + em->bm->totface;
}
else {
geom_faces = DRW_mesh_batch_cache_get_surface(me);
face_shgrp = stl->g_data->shgrp_face_unif;
DRW_shgroup_uniform_int_copy(face_shgrp, "id", 0);
*r_face_offset = initial_offset;