Fixed Camera Ortho scale animation import
[blender-staging.git] / source / blender / collada / MaterialExporter.cpp
index d155b2196ffaa8a00a57ddba7b2d3651887ceb76..a44fa6802f20a3a460d2007455d69e1f84abfa5d 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#include "COLLADABUUtils.h"
+/** \file blender/collada/MaterialExporter.cpp
+ *  \ingroup collada
+ */
+
+
 
 #include "MaterialExporter.h"
+#include "COLLADABUUtils.h"
 #include "collada_internal.h"
 
 MaterialsExporter::MaterialsExporter(COLLADASW::StreamWriter *sw): COLLADASW::LibraryMaterials(sw){}
 
-void MaterialsExporter::exportMaterials(Scene *sce)
+void MaterialsExporter::exportMaterials(Scene *sce, bool export_selected)
 {
        openLibrary();
 
        MaterialFunctor mf;
-       mf.forEachMaterialInScene<MaterialsExporter>(sce, *this);
+       mf.forEachMaterialInScene<MaterialsExporter>(sce, *this, export_selected);
 
        closeLibrary();
 }
@@ -44,7 +49,7 @@ void MaterialsExporter::operator()(Material *ma, Object *ob)
 {
        std::string name(id_name(ma));
 
-       openMaterial(translate_id(name), name);
+       openMaterial(get_material_id(ma), name);
 
        std::string efid = translate_id(name) + "-effect";
        addInstanceEffect(COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, efid));