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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user