Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-08-02 19:58:11 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-08-02 19:58:11 +0400
commitab777e957cb8e8bde925af9dc6f960e4f045fa7a (patch)
tree317b8ca4d30ec1088143edfa8c5489c97b9db5a6 /source/blender/collada/MeshImporter.cpp
parentc17f5960df41106a9d21b95dfdf54dbb505cbc71 (diff)
fix(Collada): wrong usage of the set attribute with multiple UV sets
Diffstat (limited to 'source/blender/collada/MeshImporter.cpp')
-rw-r--r--source/blender/collada/MeshImporter.cpp7
1 files changed, 2 insertions, 5 deletions
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) {