diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 1e0f0244072..8aa68ed9d04 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -618,13 +618,10 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me) set_poly_indices(mpoly, mloop, loop_index, position_indices, vcount); - for (unsigned int l = 0; l < index_list_array.getCount(); l++) { - int uvset_index = index_list_array[l]->getSetIndex(); - + for (unsigned int uvset_index = 0; uvset_index < index_list_array.getCount(); uvset_index++) { // get mtface by face index and uv set index MLoopUV *mloopuv = (MLoopUV *)CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, uvset_index); - - set_face_uv(mloopuv+loop_index, uvs, start_index, *index_list_array[l], vcount); + set_face_uv(mloopuv+loop_index, uvs, start_index, *index_list_array[uvset_index], vcount); } if (mp_has_normals) {