diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-20 18:29:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-20 18:42:31 +0300 |
commit | f06dc36c35d6da1e2f3116752cf3245373f867b0 (patch) | |
tree | 0e2e1ff006f6d38eea1353db933c65f8c7f2b127 /source/blender/editors/metaball/mball_edit.c | |
parent | 3602071e47f4cb6613448c14c931fbd6ffb45ead (diff) |
Select Similar: use kdtree de-duplication
Avoids redundant tree traversal when finding nearest.
Diffstat (limited to 'source/blender/editors/metaball/mball_edit.c')
-rw-r--r-- | source/blender/editors/metaball/mball_edit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 2aa9ab4c914..8da87a4fdd1 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -363,9 +363,11 @@ static int mball_select_similar_exec(bContext *C, wmOperator *op) } if (tree_1d != NULL) { + BLI_kdtree_1d_deduplicate(tree_1d); BLI_kdtree_1d_balance(tree_1d); } if (tree_3d != NULL) { + BLI_kdtree_3d_deduplicate(tree_3d); BLI_kdtree_3d_balance(tree_3d); } /* Select MetaBalls with desired type. */ |