diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-07 18:43:04 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-07 18:43:31 +0300 |
commit | 764cc75e1f92abefa3adf4ece3bbfe99e5227599 (patch) | |
tree | c77ed3b31fdeaeecce20d0414b88cd5c7ac042b9 /source/blender/editors/mesh/meshtools.c | |
parent | 9d7d34c12af5525d969a8806bc059dbb7a499d0f (diff) |
Edit Mesh Selection: Move ED_view3d_select_ functions to bf_draw
It is easier to deal with private values of the DRW_select engine and gives room for improvement.
Reviewers: campbellbarton, fclem
Differential Revision: https://developer.blender.org/D5415
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 11 |
1 files changed, 6 insertions, 5 deletions
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) { |