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>2012-07-29 21:49:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-29 21:49:14 +0400
commitf608b3c44402ef5c58217481d93e7fa83c9cd7cf (patch)
treecc8211154eb5a3cf9e1d89484cbe48facd51b90e /source/blender/editors/uvedit
parentc41e1e434ab9defa35178ad8886d81b60d889e9a (diff)
code cleanup:
- building without python works again - rename maxi/mini to i_max/i_min (so thay are available for function names) - some minor edits to IK stretch setting (no functional changes).
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index a2e276c09e3..c6ded2a91cf 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -3469,7 +3469,7 @@ static float p_chart_minimum_area_angle(PChart *chart)
float rotated, minarea, minangle, area, len;
float *angles, miny, maxy, v[2], a[4], mina;
- int npoints, right, mini, maxi, i, idx[4], nextidx;
+ int npoints, right, i_min, i_max, i, idx[4], nextidx;
PVert **points, *p1, *p2, *p3, *p4, *p1n;
/* compute convex hull */
@@ -3479,7 +3479,7 @@ static float p_chart_minimum_area_angle(PChart *chart)
/* find left/top/right/bottom points, and compute angle for each point */
angles = MEM_mallocN(sizeof(float) * npoints, "PMinAreaAngles");
- mini = maxi = 0;
+ i_min = i_max = 0;
miny = 1e10;
maxy = -1e10;
@@ -3492,19 +3492,19 @@ static float p_chart_minimum_area_angle(PChart *chart)
if (points[i]->uv[1] < miny) {
miny = points[i]->uv[1];
- mini = i;
+ i_min = i;
}
if (points[i]->uv[1] > maxy) {
maxy = points[i]->uv[1];
- maxi = i;
+ i_max = i;
}
}
/* left, top, right, bottom */
idx[0] = 0;
- idx[1] = maxi;
+ idx[1] = i_max;
idx[2] = right;
- idx[3] = mini;
+ idx[3] = i_min;
v[0] = points[idx[0]]->uv[0];
v[1] = points[idx[0]]->uv[1] + 1.0f;
@@ -3530,29 +3530,29 @@ static float p_chart_minimum_area_angle(PChart *chart)
while (rotated <= (float)(M_PI / 2.0)) { /* INVESTIGATE: how far to rotate? */
/* rotate with the smallest angle */
- mini = 0;
+ i_min = 0;
mina = 1e10;
for (i = 0; i < 4; i++)
if (a[i] < mina) {
mina = a[i];
- mini = i;
+ i_min = i;
}
rotated += mina;
- nextidx = (idx[mini] + 1) % npoints;
+ nextidx = (idx[i_min] + 1) % npoints;
- a[mini] = angles[nextidx];
- a[(mini + 1) % 4] = a[(mini + 1) % 4] - mina;
- a[(mini + 2) % 4] = a[(mini + 2) % 4] - mina;
- a[(mini + 3) % 4] = a[(mini + 3) % 4] - mina;
+ a[i_min] = angles[nextidx];
+ a[(i_min + 1) % 4] = a[(i_min + 1) % 4] - mina;
+ a[(i_min + 2) % 4] = a[(i_min + 2) % 4] - mina;
+ a[(i_min + 3) % 4] = a[(i_min + 3) % 4] - mina;
/* compute area */
- p1 = points[idx[mini]];
+ p1 = points[idx[i_min]];
p1n = points[nextidx];
- p2 = points[idx[(mini + 1) % 4]];
- p3 = points[idx[(mini + 2) % 4]];
- p4 = points[idx[(mini + 3) % 4]];
+ p2 = points[idx[(i_min + 1) % 4]];
+ p3 = points[idx[(i_min + 2) % 4]];
+ p4 = points[idx[(i_min + 3) % 4]];
len = len_v2v2(p1->uv, p1n->uv);
@@ -3570,7 +3570,7 @@ static float p_chart_minimum_area_angle(PChart *chart)
}
}
- idx[mini] = nextidx;
+ idx[i_min] = nextidx;
}
/* try keeping rotation as small as possible */