Fix T51135: Cylinder primitive generated bad UVs

This commit is contained in:
Germano Cavalcante 2017-04-06 12:20:22 -03:00
parent c684fab8a6
commit d426c335c5
Notes: blender-bot 2023-02-14 07:07:13 +01:00
Referenced by issue #51135, Cylinder primitive generates bad uvs.
Referenced by issue #51048, Freestyle rendering, Rendering time infinite and total drain PC resources.
1 changed files with 2 additions and 4 deletions

View File

@ -1566,7 +1566,7 @@ void BM_mesh_calc_uvs_cone(
BLI_assert(cd_loop_uv_offset != -1); /* caller is responsible for ensuring the mesh has UVs */
x = 0.0f;
x = 1.0f;
y = 1.0f - uv_height;
BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) {
@ -1580,7 +1580,7 @@ void BM_mesh_calc_uvs_cone(
switch (loop_index) {
case 0:
x += uv_width;
/* Continue in the last position */
break;
case 1:
y += uv_height;
@ -1598,8 +1598,6 @@ void BM_mesh_calc_uvs_cone(
luv->uv[0] = x;
luv->uv[1] = y;
}
x += uv_width;
}
else {
/* top or bottom face - so unwrap it by transforming back to a circle and using the X/Y coords */