Fix #33168: collada export added incorrect -material postfix to material names.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 27 Nov 2012 21:26:06 +0000 (21:26 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 27 Nov 2012 21:26:06 +0000 (21:26 +0000)
In the bug report it was also mentioned that special characters should be
preserved for names, however the collada 1.4 specification does not allow this.
Version 1.5 does, but we are still writing 1.4 files and files with such special
characters will then fail to open in some applications.

source/blender/collada/MaterialExporter.cpp

index 5a1d8b7602a4b2b1941399a745328f38aade742e..4aece997f72d6ef1962de215a4d788a18a2855de 100644 (file)
@@ -70,7 +70,7 @@ void MaterialsExporter::operator()(Material *ma, Object *ob)
 {
        std::string name(id_name(ma));
 
-       openMaterial(get_material_id(ma), get_material_id(ma));
+       openMaterial(get_material_id(ma), translate_id(name));
 
        std::string efid = translate_id(name) + "-effect";
        addInstanceEffect(COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, efid));