diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-02-12 21:52:18 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-02-12 21:52:18 +0400 |
commit | 8996184ac4e96af4c7e2e46d3f836c962ccdb0b0 (patch) | |
tree | d6571083a2ea6ec496bc1f85297ad32025ab0f46 /source/blender/collada/MeshImporter.cpp | |
parent | 751bee184598859d99922d228e0de4a0df96de26 (diff) |
Fixed importing of shapekey names: name is now taken from geometry name instead of deriving it from the mesh name
Diffstat (limited to 'source/blender/collada/MeshImporter.cpp')
-rw-r--r-- | source/blender/collada/MeshImporter.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index bf5a39cfae8..26915f37002 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -952,6 +952,13 @@ Mesh *MeshImporter::get_mesh_by_geom_uid(const COLLADAFW::UniqueId& mesh_uid) return NULL; } +std::string *MeshImporter::get_geometry_name(const std::string &mesh_name) +{ + if (this->mesh_geom_map.find(mesh_name) != this->mesh_geom_map.end()) + return &this->mesh_geom_map[mesh_name]; + return NULL; +} + MTex *MeshImporter::assign_textures_to_uvlayer(COLLADAFW::TextureCoordinateBinding &ctexture, Mesh *me, TexIndexTextureArrayMap& texindex_texarray_map, MTex *color_texture) @@ -1300,7 +1307,9 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry *geom) // store the Mesh pointer to link it later with an Object this->uid_mesh_map[mesh->getUniqueId()] = me; - + // needed to map mesh to its geometry name (needed for shape key naming) + this->mesh_geom_map[std::string(me->id.name)] = str_geom_id; + int new_tris = 0; read_vertices(mesh, me); |