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:
authorNathan Letwory <nathan@letworyinteractive.com>2011-03-23 01:51:02 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2011-03-23 01:51:02 +0300
commitde89e78589f1a4aba0f212ceb83c809bdb19474a (patch)
treec46de4f5aec14756ca26b57ed4ac1d5370d10d5a /source/blender/collada/InstanceWriter.cpp
parent60b94886c8e24c5da9bf5a70469a2abcf198a014 (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.cpp5
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;