Blender V4.5
blender::io::obj::OBJParser Class Reference

#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
 

Detailed Description

Definition at line 24 of file obj_import_file_reader.hh.

Constructor & Destructor Documentation

◆ OBJParser()

blender::io::obj::OBJParser::OBJParser ( const OBJImportParams & import_params,
size_t read_buffer_size )

Open OBJ file at the path given in import parameters.

Definition at line 427 of file obj_import_file_reader.cc.

References BKE_reportf(), BLI_fopen(), CLOG_ERROR, OBJImportParams::filepath, LOG, OBJImportParams::reports, and RPT_ERROR.

◆ ~OBJParser()

blender::io::obj::OBJParser::~OBJParser ( )

Definition at line 441 of file obj_import_file_reader.cc.

Member Function Documentation

◆ mtl_libraries()

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 814 of file obj_import_file_reader.cc.

◆ parse()

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 483 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_strip(), CLOG_ERROR, CLOG_WARN, blender::io::obj::create_geometry(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::io::drop_whitespace(), blender::StringRefBase::end(), FILE_MAXFILE, OBJImportParams::filepath, blender::io::fixup_line_continuations(), blender::io::obj::GlobalVertices::flush_mrgb_block(), blender::io::obj::geom_add_curve_parameters(), blender::io::obj::geom_add_curve_vertex_indices(), blender::io::obj::geom_add_mrgb_colors(), blender::io::obj::geom_add_polygon(), blender::io::obj::geom_add_polyline(), 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_new_object(), 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(), LOG, 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::read_next_line(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), STRNCPY(), blender::StringRefBase::trim(), blender::io::obj::use_all_vertices_if_no_faces(), OBJImportParams::use_split_groups, and OBJImportParams::use_split_objects.


The documentation for this class was generated from the following files: