Merge branch 'master' into blender2.8
[blender.git] / source / blender / collada / GeometryExporter.h
index dea97fc1286ac8db6e471428c17086bc8035a380..5d74124b07a82aa2bf7adab2a7ecd90015a8dff5 100644 (file)
@@ -46,6 +46,8 @@
 
 #include "BKE_key.h"
 
+struct Depsgraph;
+
 extern Object *bc_get_highest_selected_ancestor_or_self(Object *ob);
 
 class Normal
@@ -72,13 +74,14 @@ class GeometryExporter : COLLADASW::LibraryGeometries
 
        Normal n;
 
+       struct Depsgraph *mDepsgraph;
        Main *m_bmain;
        Scene *mScene;
 
 public:
        GeometryExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
 
-       void exportGeom(Main *bmain, Scene *sce);
+       void exportGeom(Main *bmain, Depsgraph *depsgraph, Scene *sce);
 
        void operator()(Object *ob);
 
@@ -86,32 +89,14 @@ public:
                                                     Mesh   *me,
                                                     std::string& geom_id);
 
-       // Create polylists for meshes with Materials
+       // powerful because it handles both cases when there is material and when there's not
        void createPolylist(short material_index,
-               bool has_uvs,
-               bool has_color,
-               Object *ob,
-               Mesh   *me,
-               std::string& geom_id,
-               std::vector<BCPolygonNormalsIndices>& norind);
-
-       // Create polylists for meshes with UV Textures
-       void createPolylists(std::set<Image *> uv_images,
-               bool has_uvs,
-               bool has_color,
-               Object *ob,
-               Mesh   *me,
-               std::string& geom_id,
-               std::vector<BCPolygonNormalsIndices>& norind);
-
-       // Create polylists for meshes with UV Textures
-       void createPolylist(std::string imageid,
-               bool has_uvs,
-               bool has_color,
-               Object *ob,
-               Mesh   *me,
-               std::string& geom_id,
-               std::vector<BCPolygonNormalsIndices>& norind);
+                                               bool has_uvs,
+                                               bool has_color,
+                                               Object *ob,
+                                               Mesh   *me,
+                                               std::string& geom_id,
+                                               std::vector<BCPolygonNormalsIndices>& norind);
 
        // creates <source> for positions
        void createVertsSource(std::string geom_id, Mesh *me);