Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCian Jinks <cjinks99@gmail.com>2022-01-05 21:27:52 +0300
committerCian Jinks <cjinks99@gmail.com>2022-01-05 21:32:23 +0300
commit1dc0bf86bb50ac8fb20df071472cee53dbe31fcb (patch)
tree6a68d55c70e18c866efc12d035a19f6d98760a24 /source
parenta0edee712a79239133ff840f911f6416d4c41855 (diff)
Fix T93695: Discontinuous cutting with the knife tool
An important check to reject edge linehits when a vertex of that edge was already hit was accidentally removed in rB6e77afe6ec7b6a73f218f1fef264758abcbc778a
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 6b58e1a060d..cae781327d5 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -3017,6 +3017,12 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
for (val = BLI_smallhash_iternew(&kfes, &hiter, (uintptr_t *)&kfe); val;
val = BLI_smallhash_iternext(&hiter, (uintptr_t *)&kfe)) {
+ /* If we intersect any of the vertices, don't attempt to intersect the edge. */
+ if (BLI_smallhash_lookup(&kfvs, (intptr_t)kfe->v1) ||
+ BLI_smallhash_lookup(&kfvs, (intptr_t)kfe->v2)) {
+ continue;
+ }
+
knife_project_v2(kcd, kfe->v1->cageco, se1);
knife_project_v2(kcd, kfe->v2->cageco, se2);
int isect_kind = 1;