fix(Collada): wrong usage of the set attribute with multiple UV sets
This commit is contained in:
@@ -618,13 +618,10 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
|
|||||||
set_poly_indices(mpoly, mloop, loop_index, position_indices, vcount);
|
set_poly_indices(mpoly, mloop, loop_index, position_indices, vcount);
|
||||||
|
|
||||||
|
|
||||||
for (unsigned int l = 0; l < index_list_array.getCount(); l++) {
|
for (unsigned int uvset_index = 0; uvset_index < index_list_array.getCount(); uvset_index++) {
|
||||||
int uvset_index = index_list_array[l]->getSetIndex();
|
|
||||||
|
|
||||||
// get mtface by face index and uv set index
|
// get mtface by face index and uv set index
|
||||||
MLoopUV *mloopuv = (MLoopUV *)CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, uvset_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[uvset_index], vcount);
|
||||||
set_face_uv(mloopuv+loop_index, uvs, start_index, *index_list_array[l], vcount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mp_has_normals) {
|
if (mp_has_normals) {
|
||||||
|
Reference in New Issue
Block a user