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:
authorAntony Riakiotakis <kalast@gmail.com>2014-06-12 02:43:38 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-06-12 02:43:38 +0400
commit7b5fe4f316234022a0ab761b694cd459ce98db2d (patch)
tree587707ad84568a05c07dccde0ae45c86c034e23e /source/blender/editors/space_view3d/view3d_walk.c
parentfb6cb25c1c8797d239ca8f6c5d775eef50cc801f (diff)
Fix flickering when transform snapping in edit mode and cursor is
slightly outside the mesh. Reported by Thomas Beck on irc. Issue here is that the mesh bounding box changes as we are transforming the vertices. Solution is to collide against the initial bounding box. Unfortunately the snapping functions are made in a way that a lot of code needed to be tweaked here, but the change should be straightforward and harmless (famous last words, I know). Ideally we might want to even increase the size of the bounding box a little (as seen in screen space) to allow snapping even in cases where, cursor is slightly outside the bounding box, but since this is not so straightforward to do for all cases, at least for me, leaving this as a TODO.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_walk.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 1c3e223f3ed..991c38fd778 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -393,7 +393,7 @@ static bool walk_floor_distance_get(bContext *C, RegionView3D *rv3d, WalkInfo *w
ret = snapObjectsRayEx(CTX_data_scene(C), NULL, NULL, NULL, NULL, SCE_SNAP_MODE_FACE,
NULL, NULL,
ray_start, ray_normal, r_distance,
- NULL, &dummy_dist_px, r_location, r_normal, SNAP_ALL);
+ NULL, &dummy_dist_px, r_location, r_normal, SNAP_ALL, NULL);
/* artifically scale the distance to the scene size */
*r_distance /= walk->grid;
@@ -426,7 +426,7 @@ static bool walk_ray_cast(bContext *C, RegionView3D *rv3d, WalkInfo *walk, float
ret = snapObjectsRayEx(CTX_data_scene(C), NULL, NULL, NULL, NULL, SCE_SNAP_MODE_FACE,
NULL, NULL,
ray_start, ray_normal, ray_distance,
- NULL, &dummy_dist_px, r_location, r_normal, SNAP_ALL);
+ NULL, &dummy_dist_px, r_location, r_normal, SNAP_ALL, NULL);
/* dot is positive if both rays are facing the same direction */