Blender  V3.3
Classes | Typedefs | Enumerations | Functions | Variables
blender::io::obj Namespace Reference

Classes

struct  IndexOffsets
 
class  OBJWriter
 
class  MTLWriter
 
struct  FileTypeTraits
 
struct  FileTypeTraits< eFileType::OBJ >
 
struct  FileTypeTraits< eFileType::MTL >
 
struct  FormattingSyntax
 
struct  always_false
 
class  FormatHandler
 
struct  CustomBMeshDeleter
 
class  OBJMesh
 
struct  tex_map_XX
 
struct  MTLMaterial
 
class  OBJCurve
 
class  OBJDepsgraph
 
class  OBJParser
 
class  MTLParser
 
class  MeshFromGeometry
 
struct  UniqueNodetreeDeleter
 
class  ShaderNodetreeWrap
 
class  CurveFromGeometry
 
struct  GlobalVertices
 
struct  PolyCorner
 
struct  PolyElem
 
struct  NurbsElement
 
struct  Geometry
 
class  obj_exporter_test
 
class  ObjExporterWriterTest
 
class  obj_exporter_regression_test
 
struct  OBJExportParamsDefault
 
struct  Expectation
 
class  obj_importer_test
 
class  obj_mtl_parser_test
 

Typedefs

using unique_bmesh_ptr = std::unique_ptr< BMesh, CustomBMeshDeleter >
 
using unique_nodetree_ptr = std::unique_ptr< bNodeTree, UniqueNodetreeDeleter >
 

Enumerations

enum class  eFileType { OBJ , MTL }
 
enum class  eOBJSyntaxElement {
  vertex_coords , vertex_coords_color , uv_vertex_coords , normal ,
  poly_element_begin , vertex_uv_normal_indices , vertex_normal_indices , vertex_uv_indices ,
  vertex_indices , poly_element_end , poly_usemtl , edge ,
  cstype , nurbs_degree , curve_element_begin , curve_element_end ,
  nurbs_parameter_begin , nurbs_parameters , nurbs_parameter_end , nurbs_group_end ,
  new_line , mtllib , smooth_group , object_group ,
  object_name , string
}
 
enum class  eMTLSyntaxElement {
  newmtl , Ni , d , Ns ,
  illum , Ka , Kd , Ks ,
  Ke , map_Kd , map_Ks , map_Ns ,
  map_d , map_refl , map_Ke , map_Bump ,
  string
}
 
enum  eGeometryType { GEOM_MESH = OB_MESH , GEOM_CURVE = OB_CURVES_LEGACY }
 

Functions

static void spaces_to_underscores (std::string &r_name)
 
static int calc_chunk_count (int count)
 
template<typename Function >
void obj_parallel_chunked_output (FormatHandler< eFileType::OBJ > &fh, int tot_count, const Function &function)
 
static int get_smooth_group (const OBJMesh &mesh, const OBJExportParams &params, int poly_idx)
 
template<typename... T>
constexpr FormattingSyntax syntax_elem_to_formatting (const eOBJSyntaxElement key)
 
template<typename... T>
constexpr FormattingSyntax syntax_elem_to_formatting (const eMTLSyntaxElement key)
 
static float round_float_to_n_digits (const float f, int round_digits)
 
static float3 round_float3_to_n_digits (const float3 &v, int round_digits)
 
static void copy_property_from_node (const eNodeSocketDatatype property_type, const bNode *node, const char *identifier, MutableSpan< float > r_property)
 
static void linked_sockets_to_dest_id (const bNode *dest_node, const nodes::NodeTreeRef &node_tree, StringRefNull dest_socket_id, Vector< const nodes::OutputSocketRef * > &r_linked_sockets)
 
static const bNodeget_node_of_type (Span< const nodes::OutputSocketRef * > sockets_list, const int node_type)
 
static std::string get_image_filepath (const bNode *tex_node)
 
static const nodes::NodeReffind_bsdf_node (const nodes::NodeTreeRef *nodetree)
 
static void store_bsdf_properties (const nodes::NodeRef *bsdf_node, const Material *material, MTLMaterial &r_mtl_mat)
 
static void store_image_textures (const nodes::NodeRef *bsdf_node, const nodes::NodeTreeRef *node_tree, const Material *material, MTLMaterial &r_mtl_mat)
 
MTLMaterial mtlmaterial_for_material (const Material *material)
 
static void print_exception_error (const std::system_error &ex)
 
static bool is_curve_nurbs_compatible (const Nurb *nurb)
 
std::pair< Vector< std::unique_ptr< OBJMesh > >, Vector< std::unique_ptr< OBJCurve > > > filter_supported_objects (Depsgraph *depsgraph, const OBJExportParams &export_params)
 
static void write_mesh_objects (Vector< std::unique_ptr< OBJMesh >> exportable_as_mesh, OBJWriter &obj_writer, MTLWriter *mtl_writer, const OBJExportParams &export_params)
 
static void write_nurbs_curve_objects (const Vector< std::unique_ptr< OBJCurve >> &exportable_as_nurbs, const OBJWriter &obj_writer)
 
void export_frame (Depsgraph *depsgraph, const OBJExportParams &export_params, const char *filepath)
 
bool append_frame_to_filename (const char *filepath, const int frame, char *r_filepath_with_frames)
 
void exporter_main (bContext *C, const OBJExportParams &export_params)
 
Vector< Vector< int > > fixup_invalid_polygon (Span< float3 > vertex_coords, Span< int > face_vertex_indices)
 
void transform_object (Object *object, const OBJImportParams &import_params)
 
static Geometrycreate_geometry (Geometry *const prev_geometry, const eGeometryType new_type, StringRef name, Vector< std::unique_ptr< Geometry >> &r_all_geometries)
 
static void geom_add_vertex (const char *p, const char *end, GlobalVertices &r_global_vertices)
 
static void geom_add_mrgb_colors (const char *p, const char *end, GlobalVertices &r_global_vertices)
 
static void geom_add_vertex_normal (const char *p, const char *end, GlobalVertices &r_global_vertices)
 
static void geom_add_uv_vertex (const char *p, const char *end, GlobalVertices &r_global_vertices)
 
static void geom_add_edge (Geometry *geom, const char *p, const char *end, GlobalVertices &r_global_vertices)
 
static void geom_add_polygon (Geometry *geom, const char *p, const char *end, const GlobalVertices &global_vertices, const int material_index, const int group_index, const bool shaded_smooth)
 
static Geometrygeom_set_curve_type (Geometry *geom, const char *p, const char *end, const StringRef group_name, Vector< std::unique_ptr< Geometry >> &r_all_geometries)
 
static void geom_set_curve_degree (Geometry *geom, const char *p, const char *end)
 
static void geom_add_curve_vertex_indices (Geometry *geom, const char *p, const char *end, const GlobalVertices &global_vertices)
 
static void geom_add_curve_parameters (Geometry *geom, const char *p, const char *end)
 
static void geom_update_group (const StringRef rest_line, std::string &r_group_name)
 
static void geom_update_smooth_group (const char *p, const char *end, bool &r_state_shaded_smooth)
 
static bool parse_keyword (const char *&p, const char *end, StringRef keyword)
 
static void use_all_vertices_if_no_faces (Geometry *geom, const Vector< std::unique_ptr< Geometry >> &all_geometries, const GlobalVertices &global_vertices)
 
static eMTLSyntaxElement mtl_line_start_to_enum (const char *&p, const char *end)
 
static bool parse_texture_option (const char *&p, const char *end, MTLMaterial *material, tex_map_XX &tex_map)
 
static void parse_texture_map (const char *p, const char *end, MTLMaterial *material, const char *mtl_dir_path)
 
static Materialget_or_create_material (Main *bmain, const std::string &name, Map< std::string, std::unique_ptr< MTLMaterial >> &materials, Map< std::string, Material * > &created_materials, bool relative_paths)
 
static void set_property_of_socket (eNodeSocketDatatype property_type, StringRef socket_id, Span< float > value, bNode *r_node)
 
static Imageload_image_at_path (Main *bmain, const std::string &path, bool relative_paths)
 
static Imagecreate_placeholder_image (Main *bmain, const std::string &path)
 
static Imageload_texture_image (Main *bmain, const tex_map_XX &tex_map, bool relative_paths)
 
StringRef read_next_line (StringRef &buffer)
 
static bool is_whitespace (char c)
 
void fixup_line_continuations (char *p, char *end)
 
const char * drop_whitespace (const char *p, const char *end)
 
const char * drop_non_whitespace (const char *p, const char *end)
 
static const char * drop_plus (const char *p, const char *end)
 
const char * parse_float (const char *p, const char *end, float fallback, float &dst, bool skip_space, bool require_trailing_space)
 
const char * parse_floats (const char *p, const char *end, float fallback, float *dst, int count, bool require_trailing_space)
 
const char * parse_int (const char *p, const char *end, int fallback, int &dst, bool skip_space)
 
static void geometry_to_blender_objects (Main *bmain, Scene *scene, ViewLayer *view_layer, const OBJImportParams &import_params, Vector< std::unique_ptr< Geometry >> &all_geometries, const GlobalVertices &global_vertices, Map< std::string, std::unique_ptr< MTLMaterial >> &materials, Map< std::string, Material * > &created_materials)
 
void importer_main (bContext *C, const OBJImportParams &import_params)
 
void importer_main (Main *bmain, Scene *scene, ViewLayer *view_layer, const OBJImportParams &import_params, size_t read_buffer_size)
 
 TEST_F (obj_exporter_test, filter_objects_curves_as_mesh)
 
 TEST_F (obj_exporter_test, filter_objects_curves_as_nurbs)
 
 TEST_F (obj_exporter_test, filter_objects_selected)
 
 TEST (obj_exporter_utils, append_negative_frame_to_filename)
 
 TEST (obj_exporter_utils, append_positive_frame_to_filename)
 
static std::string read_temp_file_in_string (const std::string &file_path)
 
 TEST_F (ObjExporterWriterTest, header)
 
 TEST_F (ObjExporterWriterTest, mtllib)
 
 TEST (obj_exporter_writer, format_handler_buffer_chunking)
 
static bool strings_equal_after_first_lines (const std::string &a, const std::string &b)
 
 TEST_F (obj_exporter_regression_test, all_tris)
 
 TEST_F (obj_exporter_regression_test, all_quads)
 
 TEST_F (obj_exporter_regression_test, fgons)
 
 TEST_F (obj_exporter_regression_test, edges)
 
 TEST_F (obj_exporter_regression_test, vertices)
 
 TEST_F (obj_exporter_regression_test, non_uniform_scale)
 
 TEST_F (obj_exporter_regression_test, nurbs_as_nurbs)
 
 TEST_F (obj_exporter_regression_test, nurbs_curves_as_nurbs)
 
 TEST_F (obj_exporter_regression_test, nurbs_as_mesh)
 
 TEST_F (obj_exporter_regression_test, cube_all_data_triangulated)
 
 TEST_F (obj_exporter_regression_test, cube_normal_edit)
 
 TEST_F (obj_exporter_regression_test, cube_vertex_groups)
 
 TEST_F (obj_exporter_regression_test, cubes_positioned)
 
 TEST_F (obj_exporter_regression_test, cubes_vertex_colors)
 
 TEST_F (obj_exporter_regression_test, cubes_with_textures_strip)
 
 TEST_F (obj_exporter_regression_test, cubes_with_textures_relative)
 
 TEST_F (obj_exporter_regression_test, suzanne_all_data)
 
 TEST_F (obj_exporter_regression_test, all_curves)
 
 TEST_F (obj_exporter_regression_test, all_curves_as_nurbs)
 
 TEST_F (obj_exporter_regression_test, all_objects)
 
 TEST_F (obj_exporter_regression_test, all_objects_mat_groups)
 
 TEST (obj_import_string_utils, read_next_line)
 
 TEST (obj_import_string_utils, fixup_line_continuations)
 
static StringRef drop_whitespace (StringRef s)
 
static StringRef parse_int (StringRef s, int fallback, int &dst, bool skip_space=true)
 
static StringRef parse_float (StringRef s, float fallback, float &dst, bool skip_space=true, bool require_trailing_space=false)
 
 TEST (obj_import_string_utils, drop_whitespace)
 
 TEST (obj_import_string_utils, parse_int_valid)
 
 TEST (obj_import_string_utils, parse_int_invalid)
 
 TEST (obj_import_string_utils, parse_float_valid)
 
 TEST (obj_import_string_utils, parse_float_invalid)
 
 TEST_F (obj_importer_test, import_cube)
 
 TEST_F (obj_importer_test, import_cube_o_after_verts)
 
 TEST_F (obj_importer_test, import_suzanne_all_data)
 
 TEST_F (obj_importer_test, import_nurbs)
 
 TEST_F (obj_importer_test, import_nurbs_curves)
 
 TEST_F (obj_importer_test, import_nurbs_cyclic)
 
 TEST_F (obj_importer_test, import_nurbs_manual)
 
 TEST_F (obj_importer_test, import_nurbs_mesh)
 
 TEST_F (obj_importer_test, import_materials)
 
 TEST_F (obj_importer_test, import_cubes_with_textures_rel)
 
 TEST_F (obj_importer_test, import_faces_invalid_or_with_holes)
 
 TEST_F (obj_importer_test, import_invalid_indices)
 
 TEST_F (obj_importer_test, import_invalid_syntax)
 
 TEST_F (obj_importer_test, import_all_objects)
 
 TEST_F (obj_importer_test, import_cubes_vertex_colors)
 
 TEST_F (obj_importer_test, import_cubes_vertex_colors_mrgb)
 
 TEST_F (obj_importer_test, import_vertices)
 
 TEST_F (obj_mtl_parser_test, string_newlines_whitespace)
 
 TEST_F (obj_mtl_parser_test, cube)
 
 TEST_F (obj_mtl_parser_test, all_objects)
 
 TEST_F (obj_mtl_parser_test, materials)
 
.MTL writers.
static std::string float3_to_string (const float3 &numbers)
 

Variables

const int SMOOTH_GROUP_DISABLED = 0
 
const int SMOOTH_GROUP_DEFAULT = 1
 
static const char * DEFORM_GROUP_DISABLED = "off"
 
static const char * MATERIAL_GROUP_DISABLED = ""
 
static const int chunk_size = 32768
 
template<typename... T>
constexpr bool is_type_float = (... && std::is_floating_point_v<std::decay_t<T>>)
 
template<typename... T>
constexpr bool is_type_integral = (... && std::is_integral_v<std::decay_t<T>>)
 
template<typename... T>
constexpr bool is_type_string_related = (... && std::is_constructible_v<std::string, T>)
 
const int NOT_FOUND = -1
 
const int NEGATIVE_INIT = -10
 
static const std::pair< StringRef, int > unsupported_texture_options []
 
constexpr bool save_failing_test_output = false
 
const std::string all_objects_file = "io_tests/blend_scene/all_objects.blend"
 

Typedef Documentation

◆ unique_bmesh_ptr

using blender::io::obj::unique_bmesh_ptr = typedef std::unique_ptr<BMesh, CustomBMeshDeleter>

Definition at line 43 of file obj_export_mesh.hh.

◆ unique_nodetree_ptr

Definition at line 28 of file obj_import_mtl.hh.

Enumeration Type Documentation

◆ eFileType

Enumerator
OBJ 
MTL 

Definition at line 26 of file obj_export_io.hh.

◆ eGeometryType

Enumerator
GEOM_MESH 
GEOM_CURVE 

Definition at line 81 of file obj_import_objects.hh.

◆ eMTLSyntaxElement

Enumerator
newmtl 
Ni 
Ns 
illum 
Ka 
Kd 
Ks 
Ke 
map_Kd 
map_Ks 
map_Ns 
map_d 
map_refl 
map_Ke 
map_Bump 
string 

Definition at line 61 of file obj_export_io.hh.

◆ eOBJSyntaxElement

Enumerator
vertex_coords 
vertex_coords_color 
uv_vertex_coords 
normal 
poly_element_begin 
vertex_uv_normal_indices 
vertex_normal_indices 
vertex_uv_indices 
vertex_indices 
poly_element_end 
poly_usemtl 
edge 
cstype 
nurbs_degree 
curve_element_begin 
curve_element_end 
nurbs_parameter_begin 
nurbs_parameters 
nurbs_parameter_end 
nurbs_group_end 
new_line 
mtllib 
smooth_group 
object_group 
object_name 
string 

Definition at line 31 of file obj_export_io.hh.

Function Documentation

◆ append_frame_to_filename()

bool blender::io::obj::append_frame_to_filename ( const char *  filepath,
int  frame,
char *  r_filepath_with_frames 
)

Makes r_filepath_with_frames (which should point at a character array of size FILE_MAX) be filepath with its "#" characters replaced by the number representing frame, and with a .obj extension. Append the current frame number in the .OBJ file name.

Returns
Whether the filepath is in FILE_MAX limits.

Definition at line 301 of file obj_exporter.cc.

References blender::math::abs(), BLI_path_extension_replace(), BLI_path_frame(), BLI_strncpy(), FILE_MAX, and integer_digits_i().

Referenced by exporter_main(), and TEST().

◆ calc_chunk_count()

static int blender::io::obj::calc_chunk_count ( int  count)
static

Definition at line 204 of file obj_export_file_writer.cc.

References chunk_size, and count.

Referenced by obj_parallel_chunked_output().

◆ copy_property_from_node()

static void blender::io::obj::copy_property_from_node ( const eNodeSocketDatatype  property_type,
const bNode node,
const char *  identifier,
MutableSpan< float r_property 
)
static

◆ create_geometry()

static Geometry* blender::io::obj::create_geometry ( Geometry *const  prev_geometry,
const eGeometryType  new_type,
StringRef  name,
Vector< std::unique_ptr< Geometry >> &  r_all_geometries 
)
static

◆ create_placeholder_image()

static Image* blender::io::obj::create_placeholder_image ( Main bmain,
const std::string &  path 
)
static

◆ drop_non_whitespace()

const char * blender::io::obj::drop_non_whitespace ( const char *  p,
const char *  end 
)

Drop leading non-white-space from a string part.

Definition at line 67 of file obj_import_string_utils.cc.

References is_whitespace().

Referenced by parse_texture_option().

◆ drop_plus()

static const char* blender::io::obj::drop_plus ( const char *  p,
const char *  end 
)
static

Definition at line 75 of file obj_import_string_utils.cc.

Referenced by parse_float(), and parse_int().

◆ drop_whitespace() [1/2]

const char * blender::io::obj::drop_whitespace ( const char *  p,
const char *  end 
)

◆ drop_whitespace() [2/2]

static StringRef blender::io::obj::drop_whitespace ( StringRef  s)
static

◆ export_frame()

void blender::io::obj::export_frame ( Depsgraph depsgraph,
const OBJExportParams export_params,
const char *  filepath 
)

Export a single frame of a .obj file, according to the given export_parameters. The frame state is given in depsgraph. The output file name is given by filepath. This function is normally called from exporter_main, but is exposed here for testing purposes. Export a single frame to a .OBJ file.

Conditionally write a .MTL file also.

Definition at line 254 of file obj_exporter.cc.

References OBJExportParams::blen_filepath, BLI_assert, BLI_path_normalize(), BLI_path_slash_native(), BLI_split_dir_part(), BLI_strncpy(), depsgraph, OBJExportParams::export_materials, OBJExportParams::file_base_for_tests, OBJExportParams::filepath, filter_supported_objects(), PATH_MAX, OBJExportParams::path_mode, print_exception_error(), write_mesh_objects(), and write_nurbs_curve_objects().

Referenced by blender::io::obj::obj_exporter_regression_test::compare_obj_export_to_golden(), and exporter_main().

◆ exporter_main()

void blender::io::obj::exporter_main ( bContext C,
const OBJExportParams export_params 
)

The main function for exporting a .obj file according to the given export_parameters. It uses the context C to get the dependency graph, and from that, the Scene. Depending on whether or not export_params.export_animation is set, it writes either one file per animation frame, or just one file. Central internal function to call Scene update & writer functions.

Definition at line 310 of file obj_exporter.cc.

References append_frame_to_filename(), C, RenderData::cfra, DEG_get_input_scene(), ED_object_mode_set(), OBJExportParams::end_frame, OBJExportParams::export_animation, OBJExportParams::export_eval_mode, export_frame(), FILE_MAX, OBJExportParams::filepath, blender::io::obj::OBJDepsgraph::get(), OB_MODE_OBJECT, Scene::r, scene, OBJExportParams::start_frame, and blender::io::obj::OBJDepsgraph::update_for_newframe().

Referenced by OBJ_export().

◆ filter_supported_objects()

std::pair< Vector< std::unique_ptr< OBJMesh > >, Vector< std::unique_ptr< OBJCurve > > > blender::io::obj::filter_supported_objects ( Depsgraph depsgraph,
const OBJExportParams export_params 
)

Filter supported objects from the Scene.

Note
Curves are also stored with Meshes if export settings specify so.

Find the objects to be exported in the view_layer of the dependency graphdepsgraph, and return them in vectors unique_ptrs of OBJMesh and OBJCurve. If export_params.export_selected_objects is set, then only selected objects are to be exported, else all objects are to be exported. But only objects of type OB_MESH, OB_CURVES_LEGACY, and OB_SURF are supported; the rest will be ignored. If export_params.export_curves_as_nurbs is set, then curves of type CU_NURBS are exported in curve form in the .obj file, otherwise they are converted to mesh and returned in the OBJMesh vector. All other exportable types are always converted to mesh and returned in the OBJMesh vector.

Definition at line 88 of file obj_exporter.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BASE_SELECTED, curve, DEG_ITER_OBJECT_FLAG_DUPLI, DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET, DEG_ITER_OBJECT_FLAG_VISIBLE, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, depsgraph, OBJExportParams::export_curves_as_nurbs, OBJExportParams::export_selected_objects, ListBase::first, is_curve_nurbs_compatible(), Curve::nurb, OB_CURVES_LEGACY, OB_MESH, and OB_SURF.

Referenced by export_frame(), and TEST_F().

◆ find_bsdf_node()

static const nodes::NodeRef* blender::io::obj::find_bsdf_node ( const nodes::NodeTreeRef nodetree)
static

Find the Principled-BSDF Node in nodetree. We only want one that feeds directly into a Material Output node (that is the behavior of the legacy Python exporter).

Definition at line 157 of file obj_export_mtl.cc.

References blender::nodes::InputSocketRef::directly_linked_sockets(), node, blender::nodes::NodeTreeRef::nodes_by_type(), SH_NODE_BSDF_PRINCIPLED, bNodeType::type, and blender::nodes::NodeRef::typeinfo().

Referenced by mtlmaterial_for_material().

◆ fixup_invalid_polygon()

Vector< Vector< int > > blender::io::obj::fixup_invalid_polygon ( Span< float3 vertex_coords,
Span< int >  face_vertex_indices 
)

Given an invalid polygon (with holes or duplicated vertex indices), turn it into possibly multiple polygons that are valid.

Parameters
vertex_coordsPolygon's vertex coordinate list.
face_vertex_indicesA polygon's indices that index into the given vertex coordinate list.
Returns
List of polygons with each element containing indices of one polygon. The indices are into face_vertex_indices array.

Definition at line 22 of file importer_mesh_utils.cc.

References add_newell_cross_v3_v3v3(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), axis_dominant_v3_to_m3(), BLI_assert, CDT_CONSTRAINTS_VALID_BMESH_WITH_HOLES, delaunay_2d_calc(), faces, input, blender::Span< T >::last(), mul_v2_m3v3(), normal, normalize_v3(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), UNLIKELY, and vertex_coords.

◆ fixup_line_continuations()

void blender::io::obj::fixup_line_continuations ( char *  p,
char *  end 
)

Fix up OBJ line continuations by replacing backslash () and the following newline with spaces.

Definition at line 39 of file obj_import_string_utils.cc.

References is_whitespace().

Referenced by blender::io::obj::OBJParser::parse(), and TEST().

◆ float3_to_string()

static std::string blender::io::obj::float3_to_string ( const float3 numbers)
static

Convert float3 to string of space-separated numbers, with no leading or trailing space. Only to be used in NON-performance-critical code.

Definition at line 504 of file obj_export_file_writer.cc.

◆ geom_add_curve_parameters()

static void blender::io::obj::geom_add_curve_parameters ( Geometry geom,
const char *  p,
const char *  end 
)
static

◆ geom_add_curve_vertex_indices()

static void blender::io::obj::geom_add_curve_vertex_indices ( Geometry geom,
const char *  p,
const char *  end,
const GlobalVertices global_vertices 
)
static

◆ geom_add_edge()

static void blender::io::obj::geom_add_edge ( Geometry geom,
const char *  p,
const char *  end,
GlobalVertices r_global_vertices 
)
static

◆ geom_add_mrgb_colors()

static void blender::io::obj::geom_add_mrgb_colors ( const char *  p,
const char *  end,
GlobalVertices r_global_vertices 
)
static

◆ geom_add_polygon()

static void blender::io::obj::geom_add_polygon ( Geometry geom,
const char *  p,
const char *  end,
const GlobalVertices global_vertices,
const int  material_index,
const int  group_index,
const bool  shaded_smooth 
)
static

◆ geom_add_uv_vertex()

static void blender::io::obj::geom_add_uv_vertex ( const char *  p,
const char *  end,
GlobalVertices r_global_vertices 
)
static

◆ geom_add_vertex()

static void blender::io::obj::geom_add_vertex ( const char *  p,
const char *  end,
GlobalVertices r_global_vertices 
)
static

◆ geom_add_vertex_normal()

static void blender::io::obj::geom_add_vertex_normal ( const char *  p,
const char *  end,
GlobalVertices r_global_vertices 
)
static

◆ geom_set_curve_degree()

static void blender::io::obj::geom_set_curve_degree ( Geometry geom,
const char *  p,
const char *  end 
)
static

◆ geom_set_curve_type()

static Geometry* blender::io::obj::geom_set_curve_type ( Geometry geom,
const char *  p,
const char *  end,
const StringRef  group_name,
Vector< std::unique_ptr< Geometry >> &  r_all_geometries 
)
static

◆ geom_update_group()

static void blender::io::obj::geom_update_group ( const StringRef  rest_line,
std::string &  r_group_name 
)
static

◆ geom_update_smooth_group()

static void blender::io::obj::geom_update_smooth_group ( const char *  p,
const char *  end,
bool r_state_shaded_smooth 
)
static

◆ geometry_to_blender_objects()

static void blender::io::obj::geometry_to_blender_objects ( Main bmain,
Scene scene,
ViewLayer view_layer,
const OBJImportParams import_params,
Vector< std::unique_ptr< Geometry >> &  all_geometries,
const GlobalVertices global_vertices,
Map< std::string, std::unique_ptr< MTLMaterial >> &  materials,
Map< std::string, Material * > &  created_materials 
)
static

◆ get_image_filepath()

static std::string blender::io::obj::get_image_filepath ( const bNode tex_node)
static

◆ get_node_of_type()

static const bNode* blender::io::obj::get_node_of_type ( Span< const nodes::OutputSocketRef * >  sockets_list,
const int  node_type 
)
static

From a list of sockets, get the parent node which is of the given node type.

Definition at line 102 of file obj_export_mtl.cc.

References bNodeType::type, and bNode::typeinfo.

Referenced by store_image_textures().

◆ get_or_create_material()

static Material* blender::io::obj::get_or_create_material ( Main bmain,
const std::string &  name,
Map< std::string, std::unique_ptr< MTLMaterial >> &  materials,
Map< std::string, Material * > &  created_materials,
bool  relative_paths 
)
static

◆ get_smooth_group()

static int blender::io::obj::get_smooth_group ( const OBJMesh mesh,
const OBJExportParams params,
int  poly_idx 
)
static

◆ importer_main() [1/2]

void blender::io::obj::importer_main ( bContext C,
const OBJImportParams import_params 
)

◆ importer_main() [2/2]

void blender::io::obj::importer_main ( Main bmain,
Scene scene,
ViewLayer view_layer,
const OBJImportParams import_params,
size_t  read_buffer_size 
)

◆ is_curve_nurbs_compatible()

static bool blender::io::obj::is_curve_nurbs_compatible ( const Nurb nurb)
static

Definition at line 71 of file obj_exporter.cc.

References CU_BEZIER, Nurb::next, Nurb::pntsv, and Nurb::type.

Referenced by filter_supported_objects().

◆ is_whitespace()

static bool blender::io::obj::is_whitespace ( char  c)
static

◆ linked_sockets_to_dest_id()

static void blender::io::obj::linked_sockets_to_dest_id ( const bNode dest_node,
const nodes::NodeTreeRef node_tree,
StringRefNull  dest_socket_id,
Vector< const nodes::OutputSocketRef * > &  r_linked_sockets 
)
static

◆ load_image_at_path()

static Image* blender::io::obj::load_image_at_path ( Main bmain,
const std::string &  path,
bool  relative_paths 
)
static

◆ load_texture_image()

static Image* blender::io::obj::load_texture_image ( Main bmain,
const tex_map_XX tex_map,
bool  relative_paths 
)
static

◆ mtl_line_start_to_enum()

static eMTLSyntaxElement blender::io::obj::mtl_line_start_to_enum ( const char *&  p,
const char *  end 
)
static

Definition at line 607 of file obj_import_file_reader.cc.

References map_Bump, map_d, map_Kd, map_Ke, map_Ks, map_Ns, map_refl, parse_keyword(), and string.

Referenced by parse_texture_map().

◆ mtlmaterial_for_material()

MTLMaterial blender::io::obj::mtlmaterial_for_material ( const Material material)

◆ obj_parallel_chunked_output()

template<typename Function >
void blender::io::obj::obj_parallel_chunked_output ( FormatHandler< eFileType::OBJ > &  fh,
int  tot_count,
const Function &  function 
)

◆ parse_float() [1/2]

const char * blender::io::obj::parse_float ( const char *  p,
const char *  end,
float  fallback,
float dst,
bool  skip_space = true,
bool  require_trailing_space = false 
)

Parse a float from an input string. The parsed result is stored in dst. The function skips leading white-space unless skip_space=false. If the number can't be parsed (invalid syntax, out of range), fallback value is stored instead. If require_trailing_space is true, the character after the number has to be whitespace.

Returns the start of remainder of the input string after parsing.

Definition at line 83 of file obj_import_string_utils.cc.

References drop_plus(), drop_whitespace(), and is_whitespace().

Referenced by geom_add_curve_parameters(), blender::io::obj::MTLParser::parse_and_store(), parse_float(), parse_floats(), parse_texture_option(), and TEST().

◆ parse_float() [2/2]

static StringRef blender::io::obj::parse_float ( StringRef  s,
float  fallback,
float dst,
bool  skip_space = true,
bool  require_trailing_space = false 
)
static

◆ parse_floats()

const char * blender::io::obj::parse_floats ( const char *  p,
const char *  end,
float  fallback,
float dst,
int  count,
bool  require_trailing_space = false 
)

Parse a number of white-space separated floats from an input string. The parsed count numbers are stored in dst. If a number can't be parsed (invalid syntax, out of range), fallback value is stored instead.

Returns the start of remainder of the input string after parsing.

Definition at line 106 of file obj_import_string_utils.cc.

References count, and parse_float().

Referenced by geom_add_curve_vertex_indices(), geom_add_uv_vertex(), geom_add_vertex(), geom_add_vertex_normal(), blender::io::obj::MTLParser::parse_and_store(), and parse_texture_option().

◆ parse_int() [1/2]

const char * blender::io::obj::parse_int ( const char *  p,
const char *  end,
int  fallback,
int &  dst,
bool  skip_space = true 
)

Parse an integer from an input string. The parsed result is stored in dst. The function skips leading white-space unless skip_space=false. If the number can't be parsed (invalid syntax, out of range), fallback value is stored instead.

Returns the start of remainder of the input string after parsing.

Definition at line 119 of file obj_import_string_utils.cc.

References drop_plus(), and drop_whitespace().

Referenced by geom_add_curve_vertex_indices(), geom_add_edge(), geom_add_polygon(), geom_set_curve_degree(), geom_update_smooth_group(), parse_int(), and TEST().

◆ parse_int() [2/2]

static StringRef blender::io::obj::parse_int ( StringRef  s,
int  fallback,
int &  dst,
bool  skip_space = true 
)
static

◆ parse_keyword()

static bool blender::io::obj::parse_keyword ( const char *&  p,
const char *  end,
StringRef  keyword 
)
static

◆ parse_texture_map()

static void blender::io::obj::parse_texture_map ( const char *  p,
const char *  end,
MTLMaterial material,
const char *  mtl_dir_path 
)
static

◆ parse_texture_option()

static bool blender::io::obj::parse_texture_option ( const char *&  p,
const char *  end,
MTLMaterial material,
tex_map_XX tex_map 
)
static

◆ print_exception_error()

static void blender::io::obj::print_exception_error ( const std::system_error &  ex)
static

Definition at line 65 of file obj_exporter.cc.

Referenced by export_frame().

◆ read_next_line()

StringRef blender::io::obj::read_next_line ( StringRef buffer)

Fetches next line from an input string buffer.

The returned line will not have '
' characters at the end; the buffer is modified to contain remaining text without the input line.

Definition at line 16 of file obj_import_string_utils.cc.

References buffer, Freestyle::c, len, and ptr.

Referenced by blender::io::obj::OBJParser::parse(), blender::io::obj::MTLParser::parse_and_store(), and TEST().

◆ read_temp_file_in_string()

static std::string blender::io::obj::read_temp_file_in_string ( const std::string &  file_path)
static

◆ round_float3_to_n_digits()

static float3 blender::io::obj::round_float3_to_n_digits ( const float3 v,
int  round_digits 
)
static

◆ round_float_to_n_digits()

static float blender::io::obj::round_float_to_n_digits ( const float  f,
int  round_digits 
)
static

Round f to round_digits decimal digits.

Definition at line 353 of file obj_export_mesh.cc.

References ceilf, and powf.

Referenced by round_float3_to_n_digits().

◆ set_property_of_socket()

static void blender::io::obj::set_property_of_socket ( eNodeSocketDatatype  property_type,
StringRef  socket_id,
Span< float value,
bNode r_node 
)
static

Set the socket's (of given ID) value to the given number(s). Only float value(s) can be set using this method.

Definition at line 31 of file obj_import_mtl.cc.

References BLI_assert, copy_v3_v3(), copy_v4_v4(), blender::Span< T >::data(), blender::StringRefBase::data(), nodeFindSocket(), blender::Span< T >::size(), SOCK_FLOAT, SOCK_IN, SOCK_RGBA, SOCK_VECTOR, bNodeSocketValueVector::value, and bNodeSocketValueRGBA::value.

◆ spaces_to_underscores()

static void blender::io::obj::spaces_to_underscores ( std::string &  r_name)
static

◆ store_bsdf_properties()

static void blender::io::obj::store_bsdf_properties ( const nodes::NodeRef bsdf_node,
const Material material,
MTLMaterial r_mtl_mat 
)
static

◆ store_image_textures()

static void blender::io::obj::store_image_textures ( const nodes::NodeRef bsdf_node,
const nodes::NodeTreeRef node_tree,
const Material material,
MTLMaterial r_mtl_mat 
)
static

◆ strings_equal_after_first_lines()

static bool blender::io::obj::strings_equal_after_first_lines ( const std::string &  a,
const std::string &  b 
)
static

◆ syntax_elem_to_formatting() [1/2]

template<typename... T>
constexpr FormattingSyntax blender::io::obj::syntax_elem_to_formatting ( const eMTLSyntaxElement  key)
constexpr

◆ syntax_elem_to_formatting() [2/2]

template<typename... T>
constexpr FormattingSyntax blender::io::obj::syntax_elem_to_formatting ( const eOBJSyntaxElement  key)
constexpr

◆ TEST() [1/10]

blender::io::obj::TEST ( obj_exporter_utils  ,
append_negative_frame_to_filename   
)

Definition at line 94 of file obj_exporter_tests.cc.

References append_frame_to_filename(), BLI_strlen_utf8(), and FILE_MAX.

◆ TEST() [2/10]

blender::io::obj::TEST ( obj_exporter_utils  ,
append_positive_frame_to_filename   
)

Definition at line 105 of file obj_exporter_tests.cc.

References append_frame_to_filename(), BLI_strlen_utf8(), and FILE_MAX.

◆ TEST() [3/10]

blender::io::obj::TEST ( obj_exporter_writer  ,
format_handler_buffer_chunking   
)

◆ TEST() [4/10]

blender::io::obj::TEST ( obj_import_string_utils  ,
drop_whitespace   
)

Definition at line 59 of file obj_import_string_utils_tests.cc.

References drop_whitespace(), and EXPECT_STRREF_EQ.

◆ TEST() [5/10]

blender::io::obj::TEST ( obj_import_string_utils  ,
fixup_line_continuations   
)

◆ TEST() [6/10]

blender::io::obj::TEST ( obj_import_string_utils  ,
parse_float_invalid   
)

Definition at line 135 of file obj_import_string_utils_tests.cc.

References EXPECT_EQ(), EXPECT_STRREF_EQ, and parse_float().

◆ TEST() [7/10]

blender::io::obj::TEST ( obj_import_string_utils  ,
parse_float_valid   
)

◆ TEST() [8/10]

blender::io::obj::TEST ( obj_import_string_utils  ,
parse_int_invalid   
)

Definition at line 97 of file obj_import_string_utils_tests.cc.

References EXPECT_EQ(), EXPECT_STRREF_EQ, and parse_int().

◆ TEST() [9/10]

blender::io::obj::TEST ( obj_import_string_utils  ,
parse_int_valid   
)

Definition at line 77 of file obj_import_string_utils_tests.cc.

References EXPECT_EQ(), EXPECT_STRREF_EQ, parse_int(), and str.

◆ TEST() [10/10]

blender::io::obj::TEST ( obj_import_string_utils  ,
read_next_line   
)

◆ TEST_F() [1/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
all_curves   
)

◆ TEST_F() [2/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
all_curves_as_nurbs   
)

◆ TEST_F() [3/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
all_objects   
)

◆ TEST_F() [4/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
all_objects_mat_groups   
)

◆ TEST_F() [5/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
all_quads   
)

◆ TEST_F() [6/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
all_tris   
)

◆ TEST_F() [7/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
cube_all_data_triangulated   
)

◆ TEST_F() [8/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
cube_normal_edit   
)

◆ TEST_F() [9/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
cube_vertex_groups   
)

◆ TEST_F() [10/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
cubes_positioned   
)

◆ TEST_F() [11/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
cubes_vertex_colors   
)

◆ TEST_F() [12/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
cubes_with_textures_relative   
)

◆ TEST_F() [13/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
cubes_with_textures_strip   
)

◆ TEST_F() [14/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
edges   
)

◆ TEST_F() [15/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
fgons   
)

◆ TEST_F() [16/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
non_uniform_scale   
)

◆ TEST_F() [17/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
nurbs_as_mesh   
)

◆ TEST_F() [18/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
nurbs_as_nurbs   
)

◆ TEST_F() [19/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
nurbs_curves_as_nurbs   
)

◆ TEST_F() [20/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
suzanne_all_data   
)

◆ TEST_F() [21/47]

blender::io::obj::TEST_F ( obj_exporter_regression_test  ,
vertices   
)

◆ TEST_F() [22/47]

blender::io::obj::TEST_F ( obj_exporter_test  ,
filter_objects_curves_as_mesh   
)

◆ TEST_F() [23/47]

blender::io::obj::TEST_F ( obj_exporter_test  ,
filter_objects_curves_as_nurbs   
)

◆ TEST_F() [24/47]

blender::io::obj::TEST_F ( obj_exporter_test  ,
filter_objects_selected   
)

◆ TEST_F() [25/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_all_objects   
)

Definition at line 441 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [26/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_cube   
)

Definition at line 147 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [27/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_cube_o_after_verts   
)

Definition at line 164 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [28/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_cubes_vertex_colors   
)

Definition at line 596 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [29/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_cubes_vertex_colors_mrgb   
)

Definition at line 667 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [30/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_cubes_with_textures_rel   
)

Definition at line 315 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [31/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_faces_invalid_or_with_holes   
)

Definition at line 363 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [32/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_invalid_indices   
)

Definition at line 405 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [33/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_invalid_syntax   
)

Definition at line 423 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [34/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_materials   
)

Definition at line 306 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [35/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_nurbs   
)

Definition at line 212 of file obj_importer_tests.cc.

References OB_CURVES_LEGACY, OB_MESH, and size().

◆ TEST_F() [36/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_nurbs_curves   
)

Definition at line 228 of file obj_importer_tests.cc.

References OB_CURVES_LEGACY, OB_MESH, and size().

◆ TEST_F() [37/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_nurbs_cyclic   
)

Definition at line 255 of file obj_importer_tests.cc.

References OB_CURVES_LEGACY, OB_MESH, and size().

◆ TEST_F() [38/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_nurbs_manual   
)

Definition at line 271 of file obj_importer_tests.cc.

References OB_CURVES_LEGACY, OB_MESH, and size().

◆ TEST_F() [39/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_nurbs_mesh   
)

Definition at line 290 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [40/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_suzanne_all_data   
)

Definition at line 194 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [41/47]

blender::io::obj::TEST_F ( obj_importer_test  ,
import_vertices   
)

Definition at line 718 of file obj_importer_tests.cc.

References OB_MESH, and size().

◆ TEST_F() [42/47]

blender::io::obj::TEST_F ( obj_mtl_parser_test  ,
all_objects   
)

◆ TEST_F() [43/47]

blender::io::obj::TEST_F ( obj_mtl_parser_test  ,
cube   
)

◆ TEST_F() [44/47]

blender::io::obj::TEST_F ( obj_mtl_parser_test  ,
materials   
)

◆ TEST_F() [45/47]

blender::io::obj::TEST_F ( obj_mtl_parser_test  ,
string_newlines_whitespace   
)

◆ TEST_F() [46/47]

blender::io::obj::TEST_F ( ObjExporterWriterTest  ,
header   
)

◆ TEST_F() [47/47]

blender::io::obj::TEST_F ( ObjExporterWriterTest  ,
mtllib   
)

◆ transform_object()

void blender::io::obj::transform_object ( Object object,
const OBJImportParams import_params 
)

◆ use_all_vertices_if_no_faces()

static void blender::io::obj::use_all_vertices_if_no_faces ( Geometry geom,
const Vector< std::unique_ptr< Geometry >> &  all_geometries,
const GlobalVertices global_vertices 
)
static

◆ write_mesh_objects()

static void blender::io::obj::write_mesh_objects ( Vector< std::unique_ptr< OBJMesh >>  exportable_as_mesh,
OBJWriter obj_writer,
MTLWriter mtl_writer,
const OBJExportParams export_params 
)
static

◆ write_nurbs_curve_objects()

static void blender::io::obj::write_nurbs_curve_objects ( const Vector< std::unique_ptr< OBJCurve >> &  exportable_as_nurbs,
const OBJWriter obj_writer 
)
static

Variable Documentation

◆ all_objects_file

const std::string blender::io::obj::all_objects_file = "io_tests/blend_scene/all_objects.blend"

Definition at line 53 of file obj_exporter_tests.cc.

Referenced by TEST_F().

◆ chunk_size

const int blender::io::obj::chunk_size = 32768
static

◆ DEFORM_GROUP_DISABLED

const char* blender::io::obj::DEFORM_GROUP_DISABLED = "off"
static

◆ is_type_float

template<typename... T>
constexpr bool blender::io::obj::is_type_float = (... && std::is_floating_point_v<std::decay_t<T>>)
constexpr

Definition at line 111 of file obj_export_io.hh.

Referenced by syntax_elem_to_formatting().

◆ is_type_integral

template<typename... T>
constexpr bool blender::io::obj::is_type_integral = (... && std::is_integral_v<std::decay_t<T>>)
constexpr

Definition at line 114 of file obj_export_io.hh.

Referenced by syntax_elem_to_formatting().

◆ is_type_string_related

template<typename... T>
constexpr bool blender::io::obj::is_type_string_related = (... && std::is_constructible_v<std::string, T>)
constexpr

Definition at line 117 of file obj_export_io.hh.

Referenced by syntax_elem_to_formatting().

◆ MATERIAL_GROUP_DISABLED

const char* blender::io::obj::MATERIAL_GROUP_DISABLED = ""
static

Per reference http://www.martinreddy.net/gfx/3d/OBJ.spec: Once a material is assigned, it cannot be turned off; it can only be changed. If a material name is not specified, a white material is used. So an empty material name is written.

Definition at line 45 of file obj_export_file_writer.cc.

Referenced by blender::io::obj::OBJWriter::write_poly_elements().

◆ NEGATIVE_INIT

const int blender::io::obj::NEGATIVE_INIT = -10

Any negative number other than NOT_FOUND to initialize usually non-negative numbers.

Definition at line 29 of file obj_export_mesh.hh.

Referenced by get_smooth_group(), blender::io::obj::OBJMesh::ith_smooth_group(), and blender::io::obj::OBJWriter::write_poly_elements().

◆ NOT_FOUND

const int blender::io::obj::NOT_FOUND = -1

Denote absence for usually non-negative numbers.

Definition at line 27 of file obj_export_mesh.hh.

Referenced by blender::io::obj::OBJWriter::write_poly_elements().

◆ save_failing_test_output

constexpr bool blender::io::obj::save_failing_test_output = false
constexpr

◆ SMOOTH_GROUP_DEFAULT

const int blender::io::obj::SMOOTH_GROUP_DEFAULT = 1

Definition at line 35 of file obj_export_file_writer.cc.

Referenced by get_smooth_group().

◆ SMOOTH_GROUP_DISABLED

const int blender::io::obj::SMOOTH_GROUP_DISABLED = 0

Per reference http://www.martinreddy.net/gfx/3d/OBJ.spec: To turn off smoothing groups, use a value of 0 or off. Polygonal elements use group numbers to put elements in different smoothing groups. For free-form surfaces, smoothing groups are either turned on or off; there is no difference between values greater than 0.

Definition at line 34 of file obj_export_file_writer.cc.

Referenced by get_smooth_group().

◆ unsupported_texture_options

const std::pair<StringRef, int> blender::io::obj::unsupported_texture_options[]
static
Initial value:
= {
{"-blendu", 1},
{"-blendv", 1},
{"-boost", 1},
{"-cc", 1},
{"-clamp", 1},
{"-imfchan", 1},
{"-mm", 2},
{"-t", 3},
{"-texres", 1},
}

Definition at line 639 of file obj_import_file_reader.cc.

Referenced by parse_texture_option().