Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-08-02 05:18:44 +0300
committermano-wii <germano.costa@ig.com.br>2019-08-02 05:19:00 +0300
commitc060a835bbcdc994e77460ae69d2fd2ecfc249ab (patch)
tree7a46e1bbb1c15cb8a38ce0fb34a81c54e9215426 /source/blender/draw/engines/select
parent58a2b2dd7e733766514e207bb876ad2c3391b107 (diff)
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).
Diffstat (limited to 'source/blender/draw/engines/select')
-rw-r--r--source/blender/draw/engines/select/select_draw_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/select/select_draw_utils.c b/source/blender/draw/engines/select/select_draw_utils.c
index 745c55405de..026fd52aa58 100644
--- a/source/blender/draw/engines/select/select_draw_utils.c
+++ b/source/blender/draw/engines/select/select_draw_utils.c
@@ -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;