Blender
V3.3
|
#include <obj_import_file_reader.hh>
Public Member Functions | |
OBJParser (const OBJImportParams &import_params, size_t read_buffer_size) | |
~OBJParser () | |
void | parse (Vector< std::unique_ptr< Geometry >> &r_all_geometries, GlobalVertices &r_global_vertices) |
Span< std::string > | mtl_libraries () const |
Definition at line 18 of file obj_import_file_reader.hh.
blender::io::obj::OBJParser::OBJParser | ( | const OBJImportParams & | import_params, |
size_t | read_buffer_size = 64 * 1024 |
||
) |
Open OBJ file at the path given in import parameters.
Definition at line 362 of file obj_import_file_reader.cc.
References BLI_fopen(), and OBJImportParams::filepath.
blender::io::obj::OBJParser::~OBJParser | ( | ) |
Definition at line 372 of file obj_import_file_reader.cc.
Span< std::string > blender::io::obj::OBJParser::mtl_libraries | ( | ) | const |
Return a list of all material library filepaths referenced by the OBJ file.
Definition at line 725 of file obj_import_file_reader.cc.
void blender::io::obj::OBJParser::parse | ( | Vector< std::unique_ptr< Geometry >> & | r_all_geometries, |
GlobalVertices & | r_global_vertices | ||
) |
Read the OBJ file line by line and create OBJ Geometry instances. Also store all the vertex and UV vertex coordinates in a struct accessible by all objects.
Definition at line 414 of file obj_import_file_reader.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::StringRefBase::begin(), BLI_path_basename(), BLI_path_extension_replace(), BLI_strncpy(), buffer, blender::io::obj::create_geometry(), blender::io::obj::drop_whitespace(), blender::StringRefBase::end(), FILE_MAXFILE, OBJImportParams::filepath, blender::io::obj::fixup_line_continuations(), blender::io::obj::geom_add_curve_parameters(), blender::io::obj::geom_add_curve_vertex_indices(), blender::io::obj::geom_add_edge(), blender::io::obj::geom_add_mrgb_colors(), blender::io::obj::geom_add_polygon(), blender::io::obj::geom_add_uv_vertex(), blender::io::obj::geom_add_vertex(), blender::io::obj::geom_add_vertex_normal(), blender::io::obj::GEOM_MESH, blender::io::obj::geom_set_curve_degree(), blender::io::obj::geom_set_curve_type(), blender::io::obj::geom_update_group(), blender::io::obj::geom_update_smooth_group(), blender::io::obj::Geometry::group_indices_, blender::io::obj::Geometry::group_order_, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add(), blender::io::obj::Geometry::material_indices_, blender::io::obj::Geometry::material_order_, blender::io::obj::parse_keyword(), blender::io::obj::read_next_line(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::StringRefBase::trim(), trim(), and blender::io::obj::use_all_vertices_if_no_faces().