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/GeometryExporter.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/GeometryExporter.cpp')
-rw-r--r-- | source/blender/collada/GeometryExporter.cpp | 6 |
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(); |