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:
authormano-wii <germano.costa@ig.com.br>2017-07-24 17:13:33 +0300
committermano-wii <germano.costa@ig.com.br>2017-07-24 17:13:33 +0300
commit7f09b55d01c248a741e967af597b7519f095983b (patch)
tree42615714cebcc47b8f66f7a9385c5f5bf78a20a9
parentb379f02f202a990da19df716242edbdc4fa065d3 (diff)
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
-rw-r--r--source/blender/editors/transform/transform_snap_object.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index 6c62c091a78..67e596dcca9 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -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) {