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>2014-03-11 08:34:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-11 08:34:19 +0400
commit57dba739176153e052d77611ff0e554f05984686 (patch)
tree317fc95876975a9743d6da1eb44513ed8bd2237d /source/blender/editors/mesh
parent23fbc9f22f3dfd7151c4396a17fbe586b0594d81 (diff)
View3d: take pixelsize into account for selection distance
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c2
-rw-r--r--source/blender/editors/mesh/editmesh_path.c6
-rw-r--r--source/blender/editors/mesh/editmesh_select.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index bc4281904b8..9a02a9761b0 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -440,7 +440,7 @@ static void loopcut_update_edge(RingSelOpData *lcd, BMEdge *e, const int preview
static void loopcut_mouse_move(RingSelOpData *lcd, const int previewlines)
{
- float dist = 75.0f;
+ float dist = ED_view3d_select_dist_px();
BMEdge *e = EDBM_edge_find_nearest(&lcd->vc, &dist);
loopcut_update_edge(lcd, e, previewlines);
}
diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c
index 3e64c22fa4e..a6e4f504bd9 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -88,7 +88,7 @@ static bool mouse_mesh_shortest_path_vert(ViewContext *vc)
BMEditMesh *em = vc->em;
BMesh *bm = em->bm;
BMVert *v_dst;
- float dist = 75.0f;
+ float dist = ED_view3d_select_dist_px();
const bool use_length = true;
v_dst = EDBM_vert_find_nearest(vc, &dist, false, false);
@@ -253,7 +253,7 @@ static bool mouse_mesh_shortest_path_edge(ViewContext *vc)
BMEditMesh *em = vc->em;
BMesh *bm = em->bm;
BMEdge *e_dst;
- float dist = 75.0f;
+ float dist = ED_view3d_select_dist_px();
const bool use_length = true;
e_dst = EDBM_edge_find_nearest(vc, &dist);
@@ -377,7 +377,7 @@ static bool mouse_mesh_shortest_path_face(ViewContext *vc)
BMEditMesh *em = vc->em;
BMesh *bm = em->bm;
BMFace *f_dst;
- float dist = 75.0f;
+ float dist = ED_view3d_select_dist_px();
const bool use_length = true;
f_dst = EDBM_face_find_nearest(vc, &dist);
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 41546e7bf07..37267d1e54b 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -649,7 +649,7 @@ BMFace *EDBM_face_find_nearest(ViewContext *vc, float *r_dist)
static int unified_findnearest(ViewContext *vc, BMVert **r_eve, BMEdge **r_eed, BMFace **r_efa)
{
BMEditMesh *em = vc->em;
- float dist = 75.0f;
+ float dist = ED_view3d_select_dist_px();
*r_eve = NULL;
*r_eed = NULL;
@@ -1191,7 +1191,7 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de
bool select = true;
bool select_clear = false;
bool select_cycle = true;
- float dist = 50.0f;
+ float dist = ED_view3d_select_dist_px() * 0.6666f;
float mvalf[2];
em_setup_viewcontext(C, &vc);