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
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2018-07-27 22:42:50 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-07-27 22:42:50 +0300
commite704c78d8799172aa0f5a9122c0ff72642db0203 (patch)
tree5610b07c0c489663c24809c88da967ba261c90c4 /source/blender/blenlib/intern/BLI_kdtree.c
parent3c643440a3348e1fc8ddc79fcdbd3933e1245562 (diff)
parent48759580839aa4e2ad2541ff4c19baaaf751721d (diff)
Merge remote-tracking branch 'origin/blender2.8' into udimtemp-udim-images
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdtree.c')
-rw-r--r--source/blender/blenlib/intern/BLI_kdtree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c
index 700000b7717..80a2957d907 100644
--- a/source/blender/blenlib/intern/BLI_kdtree.c
+++ b/source/blender/blenlib/intern/BLI_kdtree.c
@@ -774,7 +774,12 @@ int BLI_kdtree_calc_duplicates_fast(
if (ELEM(duplicates[index], -1, index)) {
p.search = index;
copy_v3_v3(p.search_co, tree->nodes[node_index].co);
+ int found_prev = found;
deduplicate_recursive(&p, tree->root);
+ if (found != found_prev) {
+ /* Prevent chains of doubles. */
+ duplicates[index] = index;
+ }
}
}
MEM_freeN(order);
@@ -786,7 +791,12 @@ int BLI_kdtree_calc_duplicates_fast(
if (ELEM(duplicates[index], -1, index)) {
p.search = index;
copy_v3_v3(p.search_co, tree->nodes[node_index].co);
+ int found_prev = found;
deduplicate_recursive(&p, tree->root);
+ if (found != found_prev) {
+ /* Prevent chains of doubles. */
+ duplicates[index] = index;
+ }
}
}
}