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:
authorGeoffrey Bantle <hairbat@yahoo.com>2006-08-18 10:08:21 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2006-08-18 10:08:21 +0400
commit4b681e391061db0fbe4d59840761d7c1a8eec79c (patch)
tree02762df92e3dcbb71d52b6ff1d2fd5ea5ba78458 /source/blender/src/editmesh_loop.c
parent8a9839fdefacc4a957b03463b043944e25ca0cf4 (diff)
-> Adjustable Tolerance for Knife Exact Snapping
Vertex Snapping for 'Knife Exact' tool was originally set at 75 pixels. Now its adjustable via the 'threshold' value in the editing context of the buttons window. I also changed the tooltip to reflect this.
Diffstat (limited to 'source/blender/src/editmesh_loop.c')
-rw-r--r--source/blender/src/editmesh_loop.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c
index fc6de54c33b..a5b41d8291e 100644
--- a/source/blender/src/editmesh_loop.c
+++ b/source/blender/src/editmesh_loop.c
@@ -480,10 +480,11 @@ static CutCurve *get_mouse_trail(int *len, char mode, char cutmode, struct GHash
short mval1[2], lockaxis=0, lockx=0, locky=0, oldmode;
EditVert *snapvert;
- short sdist;
+ short sdist, stolerance;
float *scr, mval[2], lastx=0, lasty=0;
*len=0;
+ stolerance = (int)(G.scene->toolsettings->select_thresh * 1000);
curve=(CutCurve *)MEM_callocN(1024*sizeof(CutCurve), "MouseTrail");
if (!curve) {
@@ -548,12 +549,12 @@ static CutCurve *get_mouse_trail(int *len, char mode, char cutmode, struct GHash
if(vsnap){
persp(PERSP_VIEW);
- sdist = 75;
+ sdist = stolerance;
snapvert = findnearestvert(&sdist, SELECT);
glColor3ub(255, 0, 255);
glDrawBuffer(GL_FRONT);
persp(PERSP_WIN);
- if(snapvert && (sdist < 75)){
+ if(snapvert && (sdist < stolerance)){
scr = BLI_ghash_lookup(gh, snapvert);
mval[0] = scr[0];
mval[1] = scr[1];