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/GeometryExporter.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/GeometryExporter.cpp')
-rw-r--r--source/blender/collada/GeometryExporter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index 9edfbe14a71..332df0318e9 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -28,6 +28,8 @@
*/
+#include <sstream>
+
#include "COLLADASWPrimitves.h"
#include "COLLADASWSource.h"
#include "COLLADASWVertices.h"
@@ -167,7 +169,9 @@ void GeometryExporter::createPolylist(int material_index,
// sets material name
if (ma) {
- polylist.setMaterial(translate_id(id_name(ma)));
+ std::ostringstream ostr;
+ ostr << translate_id(id_name(ma)) << material_index+1;
+ polylist.setMaterial(ostr.str());
}
COLLADASW::InputList &til = polylist.getInputList();