diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-23 01:51:02 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-23 01:51:02 +0300 |
commit | de89e78589f1a4aba0f212ceb83c809bdb19474a (patch) | |
tree | c46de4f5aec14756ca26b57ed4ac1d5370d10d5a /source/blender/collada/InstanceWriter.cpp | |
parent | 60b94886c8e24c5da9bf5a70469a2abcf198a014 (diff) |
Fix [#26475] <instance_material> wrong in COLLADA export.
reported by Juan Linietsky
fix by Imran Syed (freakabcd)
Use material index suffixed to material name to create symbolic name.
Diffstat (limited to 'source/blender/collada/InstanceWriter.cpp')
-rw-r--r-- | source/blender/collada/InstanceWriter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/collada/InstanceWriter.cpp b/source/blender/collada/InstanceWriter.cpp index f822db0f39b..a069e72fbbd 100644 --- a/source/blender/collada/InstanceWriter.cpp +++ b/source/blender/collada/InstanceWriter.cpp @@ -29,6 +29,7 @@ #include <string> +#include <sstream> #include "COLLADASWInstanceMaterial.h" @@ -52,7 +53,9 @@ void InstanceWriter::add_material_bindings(COLLADASW::BindMaterial& bind_materia if (ma) { std::string matid(get_material_id(ma)); matid = translate_id(matid); - COLLADASW::InstanceMaterial im(matid, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, matid)); + std::ostringstream ostr; + ostr << translate_id(id_name(ma)) << a+1; + COLLADASW::InstanceMaterial im(ostr.str(), COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, matid)); // create <bind_vertex_input> for each uv layer Mesh *me = (Mesh*)ob->data; |