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:
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_ops.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index f771feeff2c..108481b9dae 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1853,7 +1853,7 @@ static int uv_remove_doubles_to_selected(bContext *C, wmOperator *op)
uv_maxlen += em->bm->totloop;
}
- KDTree *tree = BLI_kdtree_new(uv_maxlen);
+ KDTree_3d *tree = BLI_kdtree_3d_new(uv_maxlen);
int *duplicates = NULL;
BLI_array_declare(duplicates);
@@ -1886,7 +1886,7 @@ static int uv_remove_doubles_to_selected(bContext *C, wmOperator *op)
if (uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) {
MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
copy_v3_fl3(uvw, luv->uv[0], luv->uv[1], 0.0f);
- BLI_kdtree_insert(tree, mloopuv_count, uvw);
+ BLI_kdtree_3d_insert(tree, mloopuv_count, uvw);
BLI_array_append(duplicates, -1);
BLI_array_append(mloopuv_arr, luv);
mloopuv_count++;
@@ -1897,8 +1897,8 @@ static int uv_remove_doubles_to_selected(bContext *C, wmOperator *op)
ob_mloopuv_max_idx[ob_index] = mloopuv_count - 1;
}
- BLI_kdtree_balance(tree);
- int found_duplicates = BLI_kdtree_calc_duplicates_fast(tree, threshold, false, duplicates);
+ BLI_kdtree_3d_balance(tree);
+ int found_duplicates = BLI_kdtree_3d_calc_duplicates_fast(tree, threshold, false, duplicates);
if (found_duplicates > 0) {
/* Calculate average uv for duplicates. */
@@ -1955,7 +1955,7 @@ static int uv_remove_doubles_to_selected(bContext *C, wmOperator *op)
}
}
- BLI_kdtree_free(tree);
+ BLI_kdtree_3d_free(tree);
BLI_array_free(mloopuv_arr);
BLI_array_free(duplicates);
MEM_freeN(changed);
@@ -1987,7 +1987,7 @@ static int uv_remove_doubles_to_unselected(bContext *C, wmOperator *op)
uv_maxlen += em->bm->totloop;
}
- KDTree *tree = BLI_kdtree_new(uv_maxlen);
+ KDTree_3d *tree = BLI_kdtree_3d_new(uv_maxlen);
MLoopUV **mloopuv_arr = NULL;
BLI_array_declare(mloopuv_arr);
@@ -2018,7 +2018,7 @@ static int uv_remove_doubles_to_unselected(bContext *C, wmOperator *op)
if (!uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) {
MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
copy_v3_fl3(uvw, luv->uv[0], luv->uv[1], 0.0f);
- BLI_kdtree_insert(tree, mloopuv_count, uvw);
+ BLI_kdtree_3d_insert(tree, mloopuv_count, uvw);
BLI_array_append(mloopuv_arr, luv);
mloopuv_count++;
}
@@ -2026,7 +2026,7 @@ static int uv_remove_doubles_to_unselected(bContext *C, wmOperator *op)
}
}
- BLI_kdtree_balance(tree);
+ BLI_kdtree_3d_balance(tree);
/* For each selected uv, find duplicate non selected uv. */
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
@@ -2053,8 +2053,8 @@ static int uv_remove_doubles_to_unselected(bContext *C, wmOperator *op)
MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
copy_v3_fl3(uvw, luv->uv[0], luv->uv[1], 0.0f);
- KDTreeNearest nearest;
- const int i = BLI_kdtree_find_nearest(tree, uvw, &nearest);
+ KDTreeNearest_3d nearest;
+ const int i = BLI_kdtree_3d_find_nearest(tree, uvw, &nearest);
if (i != -1 && nearest.dist < threshold) {
copy_v2_v2(luv->uv, mloopuv_arr[i]->uv);
@@ -2071,7 +2071,7 @@ static int uv_remove_doubles_to_unselected(bContext *C, wmOperator *op)
}
}
- BLI_kdtree_free(tree);
+ BLI_kdtree_3d_free(tree);
BLI_array_free(mloopuv_arr);
MEM_freeN(objects);