Fix T56735: Autosmooth option corrupts UVs

This commit is contained in:
2018-10-17 13:20:44 +11:00
parent 098b86475d
commit 96dc1ad308

View File

@@ -489,7 +489,7 @@ static MeshRenderData *mesh_render_data_create_ex(
int totloop = bm->totloop;
if (is_auto_smooth) {
rdata->loop_normals = MEM_mallocN(sizeof(*rdata->loop_normals) * totloop, __func__);
int cd_loop_clnors_offset = CustomData_get_layer_index(&bm->ldata, CD_CUSTOMLOOPNORMAL);
int cd_loop_clnors_offset = CustomData_get_offset(&bm->ldata, CD_CUSTOMLOOPNORMAL);
BM_loops_calc_normal_vcos(
bm, NULL, NULL, NULL, true, split_angle, rdata->loop_normals, NULL, NULL,
cd_loop_clnors_offset, false);