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>2013-04-24 04:25:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-24 04:25:12 +0400
commit3b8221045f7421952010188049396abbdc5b9cc0 (patch)
tree3c2cccdda0a5d5103e1c8870bd28ca3a1b745a13 /source/blender/editors
parentad6cc0d0ac49ad7321ebfe72e0d8627bb9cf4f71 (diff)
simple optimizations for bvhtree_from_mesh_faces() for editmesh, was quite inefficient (unneeded loops, not breaking out of face loop early).
also correct own oversight - use TRANSFORM_DIST_MAX_RAY rather then when checking for max value in snapDerivedMesh.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/transform/transform_snap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 052742222e9..d21f65554b3 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -1394,7 +1394,7 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
bvhtree_from_mesh_faces(&treeData, dm, 0.0f, 4, 6);
hit.index = -1;
- hit.dist = *r_depth * (*r_depth == FLT_MAX ? 1.0f : local_scale);
+ hit.dist = *r_depth * (*r_depth == TRANSFORM_DIST_MAX_RAY ? 1.0f : local_scale);
if (treeData.tree && BLI_bvhtree_ray_cast(treeData.tree, ray_start_local, ray_normal_local, 0.0f, &hit, treeData.raycast_callback, &treeData) != -1) {
if (hit.dist / local_scale <= *r_depth) {