Revert "ransform: fix unreported bug: geometry hidden by clipping border (alt + b...
authormano-wii <germano.costa@ig.com.br>
Mon, 24 Jul 2017 15:08:23 +0000 (12:08 -0300)
committermano-wii <germano.costa@ig.com.br>
Mon, 24 Jul 2017 15:08:23 +0000 (12:08 -0300)
This reverts commit 7f09b55d01c248a741e967af597b7519f095983b.

source/blender/editors/transform/transform_snap_object.c

index 67e596d..6c62c09 100644 (file)
@@ -2408,12 +2408,10 @@ bool ED_transform_snap_object_project_view3d_ex(
                return false;
        }
 
-       float ray_end_dist = depth_get(ray_end, ray_start, ray_normal);
+       float ray_depth_fallback;
        if (ray_depth == NULL) {
-               ray_depth = &ray_end_dist;
-       }
-       else if (*ray_depth > ray_end_dist) {
-               *ray_depth = ray_end_dist;
+               ray_depth_fallback = BVH_RAYCAST_DIST_MAX;
+               ray_depth = &ray_depth_fallback;
        }
 
        if (snap_to == SCE_SNAP_MODE_FACE) {