Blender  V3.3
obj_import_mesh.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #include "BKE_lib_id.h"
10 
11 #include "BLI_utility_mixins.hh"
12 
13 #include "obj_import_mtl.hh"
14 #include "obj_import_objects.hh"
15 
16 struct Material;
17 
18 namespace blender::io::obj {
19 
24  private:
25  Geometry &mesh_geometry_;
26  const GlobalVertices &global_vertices_;
27 
28  public:
29  MeshFromGeometry(Geometry &mesh_geometry, const GlobalVertices &global_vertices)
30  : mesh_geometry_(mesh_geometry), global_vertices_(global_vertices)
31  {
32  }
33 
34  Object *create_mesh(Main *bmain,
35  Map<std::string, std::unique_ptr<MTLMaterial>> &materials,
36  Map<std::string, Material *> &created_materials,
37  const OBJImportParams &import_params);
38 
39  private:
45  void fixup_invalid_faces();
46  void create_vertices(Mesh *mesh);
50  void create_polys_loops(Mesh *mesh, bool use_vertex_groups);
54  void create_edges(Mesh *mesh);
58  void create_uv_verts(Mesh *mesh);
62  void create_materials(Main *bmain,
63  Map<std::string, std::unique_ptr<MTLMaterial>> &materials,
64  Map<std::string, Material *> &created_materials,
65  Object *obj,
66  bool relative_paths);
67  void create_normals(Mesh *mesh);
68  void create_colors(Mesh *mesh);
69  void create_vertex_groups(Object *obj);
70 };
71 
72 } // namespace blender::io::obj
Object * create_mesh(Main *bmain, Map< std::string, std::unique_ptr< MTLMaterial >> &materials, Map< std::string, Material * > &created_materials, const OBJImportParams &import_params)
MeshFromGeometry(Geometry &mesh_geometry, const GlobalVertices &global_vertices)
smooth(Type::VEC4, "color_mul") .smooth(Type gpFillTexture gpSceneDepthTexture materials[GPENCIL_MATERIAL_BUFFER_LEN]
Definition: gpencil_info.hh:29
Definition: BKE_main.h:121