This fixes edge snapping to edges in the same mesh, and *sort of* does the same for face snapping to faces in the same mesh although due to a TODO which I'm currently looking into in bvhutils.c, the face snapping is tough to use because it will also try to snap to selected faces (while those faces are moving).
Description
Event Timeline
regarding comment:
+ /*BMESH_TODO: zero is not the best way to signal that
+ the face is a triangle and not a quad, since 0 is
+ also the index assigned to a real vertex*/
Don't think this comment should be added, for the MFace struct this is just how tri's are defined, its annoying but not a TODO item since this is used all over.
Ok, I'm fine with removing the comment obviously.
But since the v1,v2,v3,v4 fields are indices of vertices, how does the code properly distinguish between v4==0 means the face is a triangle vs v4==0 means the 4th vertex is the vertex that got assigned index 0?
test_index_face() rotates the vertex indices's so that 0 is never v3 or v4, this is a real pain if you have to assign UV's and vertex colors later on.
I reviewed this too. See http://codereview.appspot.com/4983047/. Changes look good to me.
I committed this patch (with comment removed as discussed above). Thanks for the fix.