diff options
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 10 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 844811390ea..2f4688e2de7 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -53,7 +53,6 @@ #include "ED_mesh.h" #include "ED_screen.h" #include "ED_transform.h" -#include "ED_select_buffer_utils.h" #include "ED_select_utils.h" #include "ED_view3d.h" @@ -69,6 +68,7 @@ #include "DEG_depsgraph_query.h" #include "DRW_engine.h" +#include "DRW_select_buffer.h" #include "mesh_intern.h" /* own include */ @@ -203,7 +203,7 @@ static BMElem *edbm_select_id_bm_elem_get(Base **bases, const uint sel_id, uint { uint elem_id; char elem_type = 0; - bool success = DRW_select_elem_get(sel_id, &elem_id, r_base_index, &elem_type); + bool success = DRW_select_buffer_elem_get(sel_id, &elem_id, r_base_index, &elem_type); if (success) { Object *obedit = bases[*r_base_index]->object; @@ -319,7 +319,7 @@ BMVert *EDBM_vert_find_nearest_ex(ViewContext *vc, { DRW_draw_select_id(vc->depsgraph, vc->ar, vc->v3d, bases, bases_len, SCE_SELECT_VERTEX); - index = ED_select_buffer_find_nearest_to_point(vc->mval, 1, UINT_MAX, &dist_px); + index = DRW_select_buffer_find_nearest_to_point(vc->mval, 1, UINT_MAX, &dist_px); if (index) { eve = (BMVert *)edbm_select_id_bm_elem_get(bases, index, &base_index); @@ -541,7 +541,7 @@ BMEdge *EDBM_edge_find_nearest_ex(ViewContext *vc, { DRW_draw_select_id(vc->depsgraph, vc->ar, vc->v3d, bases, bases_len, SCE_SELECT_EDGE); - index = ED_select_buffer_find_nearest_to_point(vc->mval, 1, UINT_MAX, &dist_px); + index = DRW_select_buffer_find_nearest_to_point(vc->mval, 1, UINT_MAX, &dist_px); if (index) { eed = (BMEdge *)edbm_select_id_bm_elem_get(bases, index, &base_index); @@ -747,7 +747,7 @@ BMFace *EDBM_face_find_nearest_ex(ViewContext *vc, { DRW_draw_select_id(vc->depsgraph, vc->ar, vc->v3d, bases, bases_len, SCE_SELECT_FACE); - index = ED_select_buffer_sample_point(vc->mval); + index = DRW_select_buffer_sample_point(vc->mval); if (index) { efa = (BMFace *)edbm_select_id_bm_elem_get(bases, index, &base_index); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index b082af352b2..0bdc59c7185 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -60,8 +60,9 @@ #include "DEG_depsgraph_build.h" #include "DEG_depsgraph_query.h" +#include "DRW_select_buffer.h" + #include "ED_mesh.h" -#include "ED_select_buffer_utils.h" #include "ED_object.h" #include "ED_view3d.h" @@ -1115,11 +1116,11 @@ bool ED_mesh_pick_face(bContext *C, Object *ob, const int mval[2], uint dist_px, if (dist_px) { /* sample rect to increase chances of selecting, so that when clicking * on an edge in the backbuf, we can still select a face */ - *r_index = ED_select_buffer_find_nearest_to_point(mval, 1, me->totpoly + 1, &dist_px); + *r_index = DRW_select_buffer_find_nearest_to_point(mval, 1, me->totpoly + 1, &dist_px); } else { /* sample only on the exact position */ - *r_index = ED_select_buffer_sample_point(mval); + *r_index = DRW_select_buffer_sample_point(mval); } if ((*r_index) == 0 || (*r_index) > (unsigned int)me->totpoly) { @@ -1296,11 +1297,11 @@ bool ED_mesh_pick_vert( if (dist_px > 0) { /* sample rect to increase chances of selecting, so that when clicking * on an face in the backbuf, we can still select a vert */ - *r_index = ED_select_buffer_find_nearest_to_point(mval, 1, me->totvert + 1, &dist_px); + *r_index = DRW_select_buffer_find_nearest_to_point(mval, 1, me->totvert + 1, &dist_px); } else { /* sample only on the exact position */ - *r_index = ED_select_buffer_sample_point(mval); + *r_index = DRW_select_buffer_sample_point(mval); } if ((*r_index) == 0 || (*r_index) > (uint)me->totvert) { |