diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-16 16:37:27 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-16 16:44:43 +0300 |
commit | 20f3cbfb78b37fdc201d30be52a249cd08fa5d83 (patch) | |
tree | 11b1d628c1c50e314d657e8a0b28e13cfb190949 /source/blender/editors/mesh | |
parent | 43f0af734e42d7e539cbb68ebf390b97016048bb (diff) |
Cleanup: More clear naming in UV vertex/element mappings
Also use unsigned short for loop index within a polygon for UV vertex
mapping, which matches UV element mapping.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 250d8ca23c1..7a344be8e5a 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -561,8 +561,8 @@ UvVertMap *BM_uv_vert_map_create( } BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i) { - buf->tfindex = i; - buf->f = a; + buf->loop_of_poly_index = i; + buf->poly_index = a; buf->separate = 0; buf->next = vmap->vert[BM_elem_index_get(l->v)]; @@ -593,10 +593,10 @@ UvVertMap *BM_uv_vert_map_create( v->next = newvlist; newvlist = v; - efa = BM_face_at_index(bm, v->f); + efa = BM_face_at_index(bm, v->poly_index); /* tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */ - l = BM_iter_at_index(bm, BM_LOOPS_OF_FACE, efa, v->tfindex); + l = BM_iter_at_index(bm, BM_LOOPS_OF_FACE, efa, v->loop_of_poly_index); luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); uv = luv->uv; @@ -605,17 +605,17 @@ UvVertMap *BM_uv_vert_map_create( while (iterv) { next = iterv->next; - efa = BM_face_at_index(bm, iterv->f); + efa = BM_face_at_index(bm, iterv->poly_index); /* tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */ - l = BM_iter_at_index(bm, BM_LOOPS_OF_FACE, efa, iterv->tfindex); + l = BM_iter_at_index(bm, BM_LOOPS_OF_FACE, efa, iterv->loop_of_poly_index); luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); uv2 = luv->uv; sub_v2_v2v2(uvdiff, uv2, uv); if (fabsf(uvdiff[0]) < limit[0] && fabsf(uvdiff[1]) < limit[1] && - (!use_winding || winding[iterv->f] == winding[v->f])) + (!use_winding || winding[iterv->poly_index] == winding[v->poly_index])) { if (lastv) lastv->next = next; else vlist = next; @@ -712,7 +712,7 @@ UvElementMap *BM_uv_element_map_create( buf->l = l; buf->separate = 0; buf->island = INVALID_ISLAND; - buf->tfindex = i; + buf->loop_of_poly_index = i; buf->next = element_map->vert[BM_elem_index_get(l->v)]; element_map->vert[BM_elem_index_get(l->v)] = buf; @@ -825,7 +825,7 @@ UvElementMap *BM_uv_element_map_create( map[element - element_map->buf] = islandbufsize; islandbuf[islandbufsize].l = element->l; islandbuf[islandbufsize].separate = element->separate; - islandbuf[islandbufsize].tfindex = element->tfindex; + islandbuf[islandbufsize].loop_of_poly_index = element->loop_of_poly_index; islandbuf[islandbufsize].island = nislands; islandbufsize++; |