diff options
author | Germano <germano.costa@ig.com.br> | 2017-12-05 16:19:47 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2017-12-05 16:19:47 +0300 |
commit | 6734bb1faf3a4c5c2446ecc4d2261f0d2ea9a39b (patch) | |
tree | 6cc83f565c6cff4e27ee4d3a46a0d57ecbe083e9 /source/blender/editors | |
parent | deaeee8e4d92cfd43e641db6a86273e70a4dae7d (diff) | |
parent | 70c2d8a1a2b8b1e8c1f60f30451dbad88fba7188 (diff) |
Merge branch 'master' into blender2.8
# Conflicts:
# source/blender/editors/mesh/editmesh_select.c
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index a075ed657d1..3e0afd3095e 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -640,9 +640,17 @@ BMEdge *EDBM_edge_find_nearest_ex( unsigned int index; BMEdge *eed; + /* Make sure that the edges also are considered to find nearest. + * TODO: cleanup: add `selectmode` as a parameter */ + const short ts_selectmode = vc->scene->toolsettings->selectmode; + vc->scene->toolsettings->selectmode |= SCE_SELECT_EDGE; + /* No afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad. */ ED_view3d_backbuf_validate(eval_ctx, vc); + /* restore `selectmode` */ + vc->scene->toolsettings->selectmode = ts_selectmode; + index = ED_view3d_backbuf_sample_rect(eval_ctx, vc, vc->mval, dist_px, bm_solidoffs, bm_wireoffs, &dist_test); eed = index ? BM_edge_at_index_find_or_table(bm, index - 1) : NULL; |