diff options
author | Nicholas Rishel <rishel.nick@gmail.com> | 2012-06-22 08:40:38 +0400 |
---|---|---|
committer | Nicholas Rishel <rishel.nick@gmail.com> | 2012-06-22 08:40:38 +0400 |
commit | ec3399efa6882ea5a8fe023092c0918ee7b135d9 (patch) | |
tree | ccd42befa25324419a94b9f125436f65baa7977b /source/blender/editors | |
parent | 884d80067762beda8b803741c1ff9244f6f74ace (diff) |
This backtracks an error introduced in r48155 when trying to fix: http://projects.blender.org/tracker/?func=detail&atid=498&aid=31433&group_id=9
First half of the problem is fixed, but the second issue regarding edge/vertex snapping disregarding angle constraints will need some refactoring eventually.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index c1ad46d9d62..898399f723d 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1631,15 +1631,13 @@ static int knife_update_active(KnifeTool_OpData *kcd) kcd->cur.mval[0] = kcd->vc.mval[0]; kcd->cur.mval[1] = kcd->vc.mval[1]; - /* if angle snapping is enabled, don't snap to edges/vertices */ - if (kcd->angle_snapping == ANGLE_FREE) { - - kcd->cur.vert = knife_find_closest_vert(kcd, kcd->cur.co, kcd->cur.cage, &kcd->cur.bmface, &kcd->cur.is_space); - - if (!kcd->cur.vert) { - kcd->cur.edge = knife_find_closest_edge(kcd, kcd->cur.co, kcd->cur.cage, &kcd->cur.bmface, &kcd->cur.is_space); - } + /* XXX knife_snap_angle updates the view coordinate mouse values to constrained angles, + * which current mouse values are set to current mouse values are then used + * for vertex and edge snap detection, without regard to the exact angle constraint */ + kcd->cur.vert = knife_find_closest_vert(kcd, kcd->cur.co, kcd->cur.cage, &kcd->cur.bmface, &kcd->cur.is_space); + if (!kcd->cur.vert) { + kcd->cur.edge = knife_find_closest_edge(kcd, kcd->cur.co, kcd->cur.cage, &kcd->cur.bmface, &kcd->cur.is_space); } /* if no hits are found this would normally default to (0, 0, 0) so instead |