[Bf-blender-cvs] [fc889615f77] master: Fix vert/edge knife snapping when the cursor wasn't over a face
Campbell Barton
noreply at git.blender.org
Mon Mar 29 09:22:28 CEST 2021
Commit: fc889615f770f3163cef9768c88050100875807c
Author: Campbell Barton
Date: Mon Mar 29 15:45:22 2021 +1100
Branches: master
https://developer.blender.org/rBfc889615f770f3163cef9768c88050100875807c
Fix vert/edge knife snapping when the cursor wasn't over a face
In this case, the cage location was left zeroed which was then
projected back onto the screen to find the nearest screen space
edge/vertex.
This made snapping to the vertex/edge fail in some corner-cases
where it was intended to work.
===================================================================
M source/blender/editors/mesh/editmesh_knife.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 1e6a2c80f91..f0b77f59a5c 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1922,6 +1922,8 @@ static BMFace *knife_find_closest_face(KnifeTool_OpData *kcd,
* of a true coordinate on the face.
* This just puts a point 1.0f in front of the view. */
add_v3_v3v3(co, origin, ray);
+ /* Use this value for the cage location too as it's used to find near edges/vertices. */
+ copy_v3_v3(cageco, co);
}
}
More information about the Bf-blender-cvs
mailing list