diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-09 04:13:28 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-09 04:13:28 +0300 |
commit | 3f9bbde4a6668b19a7a7f291dc2305e6341d5b5d (patch) | |
tree | 1422c11b03e606fca02651160e8c02b595061307 /source/blender/collada/MeshImporter.h | |
parent | b3ad45aef6409669bed8ae8b88e74ca9d12b3d72 (diff) |
Fix [#26037] Import Collada crashes Blender
Submitted by David Roy
Multiple nodes can reference the same geometry, and specify the same materials. This lead
to the import code overwriting material mappings of faces in a destructive way. Instead of
just writing the material bindings always we now keep book of what geometry+material mapping
we've already handled.
Diffstat (limited to 'source/blender/collada/MeshImporter.h')
-rw-r--r-- | source/blender/collada/MeshImporter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h index 1a9f698a7ce..20fdb0dcc6e 100644 --- a/source/blender/collada/MeshImporter.h +++ b/source/blender/collada/MeshImporter.h @@ -91,6 +91,7 @@ private: }; typedef std::map<COLLADAFW::MaterialId, std::vector<Primitive> > MaterialIdPrimitiveArrayMap; std::map<COLLADAFW::UniqueId, MaterialIdPrimitiveArrayMap> geom_uid_mat_mapping_map; // crazy name! + std::multimap<COLLADAFW::UniqueId, COLLADAFW::UniqueId> materials_mapped_to_geom; //< materials that have already been mapped to a geometry. A pair of geom uid and mat uid, one geometry can have several materials void set_face_indices(MFace *mface, unsigned int *indices, bool quad); |