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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-09 12:39:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-09 12:39:38 +0400
commitf19022f8e0760f849deb4f570995e31ebc98f2fc (patch)
treee869c668377dc78d49fb35b45c1169e944981b12 /source/blender/editors
parent8714fb7019e853703ce8b102edac43d84b7bbe14 (diff)
increase the hit radius for vertex selection in weight paint mode - increased to 50 (same as editmode), was 3.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 1c98397c7f6..4f5e98a24ce 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1946,7 +1946,7 @@ void VIEW3D_OT_select_border(wmOperatorType *ot)
/* much like facesel_face_pick()*/
/* returns 0 if not found, otherwise 1 */
-static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], unsigned int *index, short rect)
+static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], unsigned int *index, int size)
{
ViewContext vc;
view3d_set_viewcontext(C, &vc);
@@ -1954,12 +1954,12 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un
if (!me || me->totvert==0)
return 0;
- if (rect) {
+ if (size > 0) {
/* sample rect to increase changes of selecting, so that when clicking
on an face in the backbuf, we can still select a vert */
int dist;
- *index = view3d_sample_backbuf_rect(&vc, mval, 3, 1, me->totvert+1, &dist,0,NULL, NULL);
+ *index = view3d_sample_backbuf_rect(&vc, mval, size, 1, me->totvert+1, &dist,0,NULL, NULL);
}
else {
/* sample only on the exact position */
@@ -1981,7 +1981,8 @@ static int mouse_weight_paint_vertex_select(bContext *C, const int mval[2], shor
Mesh* me= obact->data; /* already checked for NULL */
unsigned int index = 0;
MVert *mv;
- if(vertsel_vert_pick(C, me, mval, &index, 1)) {
+
+ if(vertsel_vert_pick(C, me, mval, &index, 50)) {
mv = me->mvert+index;
if(extend) {
mv->flag ^= SELECT;