diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-09-04 18:31:23 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-09-04 18:31:23 +0400 |
commit | 1cada203bcae3a65f34e5631f8e8e1ae22ce4415 (patch) | |
tree | ca5fbf1763d793f8a1df9ed30df8dcd4e603d31e /source/blender/collada/MeshImporter.cpp | |
parent | 7f5c5f8ecaf6d366293cadbd8db08d4516a9499f (diff) |
[#27884] Collada import: materials mismatch when 2 instance_geometry reference the same material
Reported by David Roy
Multi-materials used on different meshes would get ignored (resulting in white faces in textured view).
Diffstat (limited to 'source/blender/collada/MeshImporter.cpp')
-rw-r--r-- | source/blender/collada/MeshImporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index e9086f05628..01eff8069c1 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -796,7 +796,7 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri std::multimap<COLLADAFW::UniqueId, COLLADAFW::UniqueId>::iterator it; it=materials_mapped_to_geom.find(*geom_uid); while(it!=materials_mapped_to_geom.end()) { - if(it->second == ma_uid) return NULL; // do nothing if already found + if(it->second == ma_uid && it->first == *geom_uid) return NULL; // do nothing if already found it++; } // first time we get geom_uid, ma_uid pair. Save for later check. |