Fix #107306: Merge by distance node is not deterministic

In some cases the node didn't reproduce the same results given the
same input. Based on the test results (just 2 very detailed cubes
and a transformation), it doesn't seem to affect performance that
much. Credit to @MMMM who pointed out this option.

Pull Request: https://projects.blender.org/blender/blender/pulls/107312
This commit is contained in:
illua1 2023-05-01 22:15:19 +02:00 committed by Hans Goudey
parent c7f1ad1058
commit 0652945dbd
1 changed files with 1 additions and 1 deletions

View File

@ -1737,7 +1737,7 @@ std::optional<Mesh *> mesh_merge_by_distance_all(const Mesh &mesh,
BLI_kdtree_3d_balance(tree);
const int vert_kill_len = BLI_kdtree_3d_calc_duplicates_fast(
tree, merge_distance, false, vert_dest_map.data());
tree, merge_distance, true, vert_dest_map.data());
BLI_kdtree_3d_free(tree);
if (vert_kill_len == 0) {