diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-06-12 02:43:38 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-06-12 02:43:38 +0400 |
commit | 7b5fe4f316234022a0ab761b694cd459ce98db2d (patch) | |
tree | 587707ad84568a05c07dccde0ae45c86c034e23e /source/blender/editors/curve | |
parent | fb6cb25c1c8797d239ca8f6c5d775eef50cc801f (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/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 61fe30e4ec5..0512980ec1f 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -5240,7 +5240,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event) const float mval[2] = {UNPACK2(event->mval)}; float no_dummy[3]; float dist_px_dummy; - snapObjectsContext(C, mval, &dist_px_dummy, location, no_dummy, SNAP_NOT_OBEDIT); + snapObjectsContext(C, mval, &dist_px_dummy, location, no_dummy, SNAP_NOT_OBEDIT, NULL); } RNA_float_set_array(op->ptr, "location", location); |