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/armature/editarmature_sketch.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/armature/editarmature_sketch.c')
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 475ffd23617..56c39e409ec 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -1088,7 +1088,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
mval[1] = dd->mval[1];
/* try to snap to closer object */
- found = snapObjectsContext(C, mval, &dist_px, vec, no, SNAP_NOT_SELECTED);
+ found = snapObjectsContext(C, mval, &dist_px, vec, no, SNAP_NOT_SELECTED, NULL);
if (found == 1) {
pt->type = dd->type;
pt->mode = PT_SNAP;