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:
authorCampbell Barton <ideasman42@gmail.com>2018-03-14 17:42:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-14 17:53:20 +0300
commit342593f1248c739a9f30c005ae710b9b9c7d0877 (patch)
treeff7e83900ff88ea3bd444b0f2321e436f89e7096 /source/blender/editors/uvedit
parentc22c2ff060a27bcd565f84233d2bbfa968b00a3f (diff)
Cleanup: rename BLI_array_count -> len
Match naming convention used everywhere else. Count should only be used when this isn't directly accessible.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 3ab2274f82e..852c4ae5958 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1746,11 +1746,11 @@ static void uv_weld_align(bContext *C, int tool)
}
/* now we have all verts, make into a line */
- if (BLI_array_count(eve_line) > 2) {
+ if (BLI_array_len(eve_line) > 2) {
/* we know the returns from these must be valid */
const float *uv_start = uv_sel_co_from_eve(scene, ima, em, eve_line[0]);
- const float *uv_end = uv_sel_co_from_eve(scene, ima, em, eve_line[BLI_array_count(eve_line) - 1]);
+ const float *uv_end = uv_sel_co_from_eve(scene, ima, em, eve_line[BLI_array_len(eve_line) - 1]);
/* For t & u modes */
float a = 0.0f;
@@ -1768,7 +1768,7 @@ static void uv_weld_align(bContext *C, int tool)
}
/* go over all verts except for endpoints */
- for (i = 0; i < BLI_array_count(eve_line); i++) {
+ for (i = 0; i < BLI_array_len(eve_line); i++) {
BM_ITER_ELEM (l, &liter, eve_line[i], BM_LOOPS_OF_VERT) {
tf = BM_ELEM_CD_GET_VOID_P(l->f, cd_poly_tex_offset);
@@ -1904,7 +1904,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
}
}
- for (uv_a_index = 0; uv_a_index < BLI_array_count(vert_arr); uv_a_index++) {
+ for (uv_a_index = 0; uv_a_index < BLI_array_len(vert_arr); uv_a_index++) {
if (vert_arr[uv_a_index].weld == false) {
float uv_min[2];
float uv_max[2];
@@ -1918,7 +1918,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
copy_v2_v2(uv_min, uv_a);
vert_arr[uv_a_index].weld = true;
- for (uv_b_index = uv_a_index + 1; uv_b_index < BLI_array_count(vert_arr); uv_b_index++) {
+ for (uv_b_index = uv_a_index + 1; uv_b_index < BLI_array_len(vert_arr); uv_b_index++) {
uv_b = vert_arr[uv_b_index].uv_loop->uv;
if ((vert_arr[uv_b_index].weld == false) &&
(len_manhattan_v2v2(uv_a, uv_b) < threshold))
@@ -1928,10 +1928,10 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
vert_arr[uv_b_index].weld = true;
}
}
- if (BLI_array_count(loop_arr)) {
+ if (BLI_array_len(loop_arr)) {
float uv_mid[2];
mid_v2_v2v2(uv_mid, uv_min, uv_max);
- for (uv_b_index = 0; uv_b_index < BLI_array_count(loop_arr); uv_b_index++) {
+ for (uv_b_index = 0; uv_b_index < BLI_array_len(loop_arr); uv_b_index++) {
copy_v2_v2(loop_arr[uv_b_index]->uv, uv_mid);
}
}
@@ -1966,12 +1966,12 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
}
}
- for (uv_a_index = 0; uv_a_index < BLI_array_count(loop_arr); uv_a_index++) {
+ for (uv_a_index = 0; uv_a_index < BLI_array_len(loop_arr); uv_a_index++) {
float dist_best = FLT_MAX, dist;
const float *uv_best = NULL;
uv_a = loop_arr[uv_a_index]->uv;
- for (uv_b_index = 0; uv_b_index < BLI_array_count(loop_arr_unselected); uv_b_index++) {
+ for (uv_b_index = 0; uv_b_index < BLI_array_len(loop_arr_unselected); uv_b_index++) {
uv_b = loop_arr_unselected[uv_b_index]->uv;
dist = len_manhattan_v2v2(uv_a, uv_b);
if ((dist < threshold) && (dist < dist_best)) {