Merge branch 'master' into blender2.8
authorGermano <germano.costa@ig.com.br>
Tue, 5 Dec 2017 13:19:47 +0000 (11:19 -0200)
committerGermano <germano.costa@ig.com.br>
Tue, 5 Dec 2017 13:19:47 +0000 (11:19 -0200)
# Conflicts:
# source/blender/editors/mesh/editmesh_select.c

1  2 
release/scripts/startup/bl_ui/properties_data_bone.py
source/blender/blenkernel/BKE_animsys.h
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/mesh/editmesh_select.c
source/blender/makesrna/intern/rna_armature.c

index a075ed657d14f01ba752fbb57dc5df05c0da4c03,1c620ad46810bbc0cb2d3109a8283e6f53c9175a..3e0afd3095ecbd400a6fe834a9deda0c860db0e1
@@@ -640,10 -634,18 +640,18 @@@ BMEdge *EDBM_edge_find_nearest_ex
                unsigned int index;
                BMEdge *eed;
  
 -              /* Make sure that the edges are considered for selection.
++              /* 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(vc);
 +              ED_view3d_backbuf_validate(eval_ctx, vc);
  
 -              index = ED_view3d_backbuf_sample_rect(vc, vc->mval, dist_px, bm_solidoffs, bm_wireoffs, &dist_test);
+               /* 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;
  
                if (r_eed_zbuf) {