Commit: 4b8ab16797ce255ed3618ba1ef64f9d05ca46424
Author: Cian Jinks
Date: Sun Sep 5 13:09:22 2021 +0100
Branches: soc-2021-knife-tools
https://developer.blender.org/rB4b8ab16797ce255ed3618ba1ef64f9d05ca46424
Fix: Knife cut vertex sometimes placed in space
When using relative constrained angle mode along an edge which has a face
hidden from view, if a cut is added it can sometimes place the previous cut
vertex in space, away from the edge.
This was caused by knife_snap_edge_constrained not working correctly when a cut
is constrained along the edge it was started from.
Fixed by adding a quick check.
===================================================================
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 5bad09c6e9c..101a15ae636 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -3443,7 +3443,8 @@ static KnifeEdge
*knife_find_closest_edge_of_face(KnifeTool_OpData *kcd,
knife_project_v2(kcd, kfe->v2->cageco, kfv2_sco);
/* Check if we're close enough and calculate 'lambda'. */
- if (kcd->is_angle_snapping || kcd->axis_constrained) {
+ /* In constrained mode calculate lambda differently, unless constrained
along kcd->prev.edge */
+ if ((kcd->is_angle_snapping || kcd->axis_constrained) && (kfe !=
kcd->prev.edge)) {
dis_sq = curdis_sq;
if (!knife_snap_edge_constrained(kcd, sco, kfv1_sco, kfv2_sco, &dis_sq,
&lambda)) {
continue;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs