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:
authorChris Blackbourn <chrisbblend@gmail.com>2022-07-14 07:19:21 +0300
committerChris Blackbourn <chrisbblend@gmail.com>2022-07-14 07:19:21 +0300
commitd3374e5337d5d50b842e274348813c15d4f57705 (patch)
treec77d60d824f07c6ab54ae1253488843af89c5105 /source/blender/geometry/intern/uv_parametrizer.c
parent931779197a9ce141eccc8b8c500f9ef726a833eb (diff)
Fix build and warnings from previous commit.
Diffstat (limited to 'source/blender/geometry/intern/uv_parametrizer.c')
-rw-r--r--source/blender/geometry/intern/uv_parametrizer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/geometry/intern/uv_parametrizer.c b/source/blender/geometry/intern/uv_parametrizer.c
index 38eb50722cf..7ef17d4e9d0 100644
--- a/source/blender/geometry/intern/uv_parametrizer.c
+++ b/source/blender/geometry/intern/uv_parametrizer.c
@@ -4260,7 +4260,6 @@ void GEO_uv_parametrizer_average(ParamHandle *phandle,
}
for (i = 0; i < phandle->ncharts; i++) {
- PFace *f;
chart = phandle->charts[i];
if (ignore_pinned && (chart->flag & PCHART_HAS_PINS)) {
@@ -4298,9 +4297,9 @@ void GEO_uv_parametrizer_average(ParamHandle *phandle,
continue;
}
float cou[3], cov[3]; /* i.e. Texture "U" and texture "V" in 3D co-ordinates.*/
- for (int i = 0; i < 3; i++) {
- cou[i] = m[0][0] * (va->co[i] - vc->co[i]) + m[0][1] * (vb->co[i] - vc->co[i]);
- cov[i] = m[1][0] * (va->co[i] - vc->co[i]) + m[1][1] * (vb->co[i] - vc->co[i]);
+ for (int k = 0; k < 3; k++) {
+ cou[k] = m[0][0] * (va->co[k] - vc->co[k]) + m[0][1] * (vb->co[k] - vc->co[k]);
+ cov[k] = m[1][0] * (va->co[k] - vc->co[k]) + m[1][1] * (vb->co[k] - vc->co[k]);
}
const float weight = p_face_area(f);
scale_cou += len_v3(cou) * weight;
@@ -4347,7 +4346,7 @@ void GEO_uv_parametrizer_average(ParamHandle *phandle,
chart->u.pack.area = 0.0f; /* 3d area */
chart->u.pack.rescale = 0.0f; /* UV area, abusing rescale for tmp storage, oh well :/ */
- for (f = chart->faces; f; f = f->nextlink) {
+ for (PFace *f = chart->faces; f; f = f->nextlink) {
chart->u.pack.area += p_face_area(f);
chart->u.pack.rescale += fabsf(p_face_uv_area_signed(f));
}