ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces

The geometry behind the farther clip_plane is not bypassed
This commit is contained in:
Germano Cavalcante 2017-07-24 11:13:33 -03:00
parent b379f02f20
commit 7f09b55d01
Notes: blender-bot 2023-02-13 22:39:58 +01:00
Referenced by commit 7fbd529fb5, Revert "ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces"
1 changed files with 5 additions and 3 deletions

View File

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