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>2012-10-05 05:34:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-05 05:34:47 +0400
commit61ce7926d305080d01a4903fb8dc90c5d74cf197 (patch)
tree71525d77d5ac1fc5e48934bdbe2ae025c286ca85 /source/blender/editors/transform
parent7339b09e7f2fa59cb672ce103036552fcbea0a72 (diff)
code cleanup: quiet warnings and use define for transform snap max distance.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_snap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 700869e10d5..c12c84b5ff5 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -80,6 +80,8 @@
#define USE_BVH_FACE_SNAP
+#define TRANSFORM_DIST_MAX_PX 1000
+
/********************* PROTOTYPES ***********************/
static void setSnappingCallback(TransInfo *t);
@@ -296,7 +298,7 @@ void applyProject(TransInfo *t)
for (i = 0; i < t->total; i++, td++) {
float iloc[3], loc[3], no[3];
float mval[2];
- int dist = 1000;
+ int dist = TRANSFORM_DIST_MAX_PX;
if (td->flag & TD_NOACTION)
break;
@@ -1238,7 +1240,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
}
else {
- new_dist = 1000;
+ new_dist = TRANSFORM_DIST_MAX_PX;
}
/* 10% threshold if edge is closer but a bit further
@@ -1299,7 +1301,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float obmat[][4],
new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
}
else {
- new_dist = 1000;
+ new_dist = TRANSFORM_DIST_MAX_PX;
}