|
Blender V4.5
|
Classes | |
| struct | IndexOffsets |
| class | OBJWriter |
| class | MTLWriter |
| class | FormatHandler |
| class | OBJMesh |
| struct | MTLTexMap |
| struct | MTLMaterial |
| class | OBJCurve |
| class | OBJDepsgraph |
| class | OBJParser |
| class | MTLParser |
| class | MeshFromGeometry |
| class | CurveFromGeometry |
| struct | GlobalVertices |
| struct | FaceCorner |
| struct | FaceElem |
| struct | NurbsElement |
| struct | Geometry |
| class | OBJExportTest |
| class | ObjExporterWriterTest |
| class | OBJExportRegressionTest |
| class | OBJMTLParserTest |
Enumerations | |
| enum class | MTLTexMapType { Color = 0 , Metallic , Specular , SpecularExponent , Roughness , Sheen , Reflection , Emission , Alpha , Normal , Count } |
| 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 &fh, int tot_count, const Function &function) |
| static int | get_smooth_group (const OBJMesh &mesh, const OBJExportParams ¶ms, int face_idx) |
| static float | round_float_to_n_digits (const float f, int round_digits) |
| static float3float3 | round_float3_to_n_digits (const float3float3 &v, int round_digits) |
| BLI_STATIC_ASSERT (ARRAY_SIZE(tex_map_type_to_socket_id)==int(MTLTexMapType::Count), "array size mismatch") | |
| 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 bNodeTree &node_tree, const char *dest_socket_id, Vector< const bNodeSocket * > &r_linked_sockets) |
| static const bNode * | get_node_of_type (Span< const bNodeSocket * > sockets_list, const int node_type) |
| static std::string | get_image_filepath (const bNode *tex_node) |
| static const bNode * | find_bsdf_node (const bNodeTree *nodetree) |
| static void | store_bsdf_properties (const bNode *bsdf_node, const Material *material, MTLMaterial &r_mtl_mat) |
| static void | store_image_textures (const bNode *bsdf_node, const bNodeTree *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 (const Span< std::unique_ptr< OBJMesh > > exportable_as_mesh, OBJWriter &obj_writer, MTLWriter *mtl_writer, const OBJExportParams &export_params) |
| static void | write_nurbs_curve_objects (const Span< 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[1024]) |
| void | exporter_main (bContext *C, const OBJExportParams &export_params) |
| Vector< Vector< int > > | fixup_invalid_face (Span< float3float3 > vert_positions, Span< int > face_verts) |
| void | transform_object (Object *object, const OBJImportParams &import_params) |
| std::string | get_geometry_name (const std::string &full_name, char separator) |
| static Geometry * | create_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 const char * | parse_vertex_index (const char *p, const char *end, size_t n_elems, int &r_index) |
| static void | geom_add_polyline (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 Geometry * | 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 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 void | geom_new_object (const char *p, const char *end, bool &r_state_shaded_smooth, std::string &r_state_group_name, int &r_state_material_index, Geometry *&r_curr_geom, Vector< std::unique_ptr< Geometry > > &r_all_geometries) |
| static bool | parse_keyword (const char *&p, const char *end, StringRef keyword) |
| static void | use_all_vertices_if_no_faces (Geometry *geom, const Span< std::unique_ptr< Geometry > > all_geometries, const GlobalVertices &global_vertices) |
| static MTLTexMapType | mtl_line_start_to_texture_type (const char *&p, const char *end) |
| static bool | parse_texture_option (const char *&p, const char *end, MTLMaterial *material, MTLTexMap &tex_map) |
| static void | parse_texture_map (const char *p, const char *end, MTLMaterial *material, const char *mtl_dir_path) |
| static Material * | 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 void | set_property_of_socket (eNodeSocketDatatype property_type, const char *socket_id, Span< float > value, bNode *r_node) |
| static Image * | load_image_at_path (Main *bmain, const std::string &path, bool relative_paths) |
| static Image * | create_placeholder_image (Main *bmain, const std::string &path) |
| static Image * | load_texture_image (Main *bmain, const MTLTexMap &tex_map, bool relative_paths) |
| static bNode * | add_node (bNodeTree *ntree, int type, float x, float y) |
| static void | link_sockets (bNodeTree *ntree, bNode *from_node, const char *from_node_id, bNode *to_node, const char *to_node_id) |
| static void | set_bsdf_socket_values (bNode *bsdf, Material *mat, const MTLMaterial &mtl_mat) |
| static void | add_image_textures (Main *bmain, bNodeTree *ntree, bNode *bsdf, Material *mat, const MTLMaterial &mtl_mat, bool relative_paths) |
| bNodeTree * | create_mtl_node_tree (Main *bmain, const MTLMaterial &mtl_mat, Material *mat, bool relative_paths) |
| static int8_t | get_valid_nurbs_degree (const NurbsElement &element) |
| static int | cyclic_repeated_points (const int8_t order, const int end_multiplicity) |
| static bool | detect_clamped_endpoint (const int8_t degree, const Span< int > multiplicity) |
| static bool | detect_knot_mode_cyclic (const int8_t degree, const Span< int > indices, const Span< float > knots, const Span< int > multiplicity) |
| static bool | detect_knot_mode_bezier (const int8_t degree, const Span< int > multiplicity) |
| static bool | detect_knot_mode_uniform (const int8_t degree, const Span< float > knots, const Span< int > multiplicity, bool clamped) |
| static Collection * | find_or_create_collection (Main *bmain, Collection *target, const std::string &geom_name, const OBJImportParams &import_params) |
| static void | geometry_to_blender_geometry_set (const OBJImportParams &import_params, const Span< std::unique_ptr< Geometry > > all_geometries, const GlobalVertices &global_vertices, Vector< bke::GeometrySet > &geometries) |
| static void | geometry_to_blender_objects (Main *bmain, Scene *scene, ViewLayer *view_layer, const OBJImportParams &import_params, MutableSpan< 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_geometry (const OBJImportParams &import_params, Vector< bke::GeometrySet > &geometries, size_t read_buffer_size) |
| 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 (OBJExportTest, filter_objects_curves_as_mesh) | |
| TEST_F (OBJExportTest, filter_objects_curves_as_nurbs) | |
| TEST_F (OBJExportTest, filter_objects_selected) | |
| TEST (obj_exporter_utils, append_negative_frame_to_filename) | |
| TEST (obj_exporter_utils, append_positive_frame_to_filename) | |
| TEST (obj_exporter_utils, append_large_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 (OBJExportRegressionTest, all_tris) | |
| TEST_F (OBJExportRegressionTest, all_quads) | |
| TEST_F (OBJExportRegressionTest, fgons) | |
| TEST_F (OBJExportRegressionTest, edges) | |
| TEST_F (OBJExportRegressionTest, vertices) | |
| TEST_F (OBJExportRegressionTest, cube_loose_edges) | |
| TEST_F (OBJExportRegressionTest, non_uniform_scale) | |
| TEST_F (OBJExportRegressionTest, nurbs_as_nurbs) | |
| TEST_F (OBJExportRegressionTest, nurbs_curves_as_nurbs) | |
| TEST_F (OBJExportRegressionTest, nurbs_as_mesh) | |
| TEST_F (OBJExportRegressionTest, cube_all_data_triangulated) | |
| TEST_F (OBJExportRegressionTest, cube_normal_edit) | |
| TEST_F (OBJExportRegressionTest, cube_vertex_groups) | |
| TEST_F (OBJExportRegressionTest, cubes_positioned) | |
| TEST_F (OBJExportRegressionTest, cubes_vertex_colors) | |
| TEST_F (OBJExportRegressionTest, cubes_with_textures_strip) | |
| TEST_F (OBJExportRegressionTest, cubes_with_textures_relative) | |
| TEST_F (OBJExportRegressionTest, suzanne_all_data) | |
| TEST_F (OBJExportRegressionTest, all_curves) | |
| TEST_F (OBJExportRegressionTest, all_curves_as_nurbs) | |
| TEST_F (OBJExportRegressionTest, all_objects) | |
| TEST_F (OBJExportRegressionTest, all_objects_mat_groups) | |
| TEST_F (OBJExportRegressionTest, materials_without_pbr) | |
| TEST_F (OBJExportRegressionTest, materials_pbr) | |
| TEST (obj_import, BufferRefillTest) | |
| TEST_F (OBJMTLParserTest, string_newlines_whitespace) | |
| TEST_F (OBJMTLParserTest, materials) | |
| TEST_F (OBJMTLParserTest, materials_pbr) | |
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 |
| const int | NOT_FOUND = -1 |
| const int | NEGATIVE_INIT = -10 |
| const char * | tex_map_type_to_socket_id [] |
| static const std::pair< StringRef, int > | unsupported_texture_options [] |
| const float | node_locx_texcoord = -880.0f |
| const float | node_locx_mapping = -680.0f |
| const float | node_locx_image = -480.0f |
| const float | node_locx_normalmap = -200.0f |
| const float | node_locx_bsdf = 0.0f |
| const float | node_locx_output = 280.0f |
| const float | node_locy_top = 300.0f |
| const float | node_locy_step = 300.0f |
| constexpr bool | save_failing_test_output = false |
| const std::string | all_objects_file = "io_tests" SEP_STR "blend_scene" SEP_STR "all_objects.blend" |
<tt>.MTL</tt> writers. | |
| static const char * | tex_map_type_to_string [] |
| BLI_STATIC_ASSERT (ARRAY_SIZE(tex_map_type_to_string)==int(MTLTexMapType::Count), "array size mismatch") | |
| static std::string | float3_to_string (const float3float3 &numbers) |
| static bool | is_pbr_map (MTLTexMapType type) |
| static bool | is_non_pbr_map (MTLTexMapType type) |
| Enumerator | |
|---|---|
| GEOM_MESH | |
| GEOM_CURVE | |
Definition at line 127 of file obj_import_objects.hh.
|
strong |
| Enumerator | |
|---|---|
| Color | |
| Metallic | |
| Specular | |
| SpecularExponent | |
| Roughness | |
| Sheen | |
| Reflection | |
| Emission | |
| Alpha | |
| Normal | |
| Count | |
Definition at line 18 of file obj_export_mtl.hh.
|
static |
Definition at line 368 of file obj_import_mtl.cc.
References add_node(), Alpha, Material::blend_flag, Material::blend_method, BLI_assert, Count, bNode::id, Image::id, blender::io::obj::MTLTexMap::is_valid(), link_sockets(), load_texture_image(), MA_BL_HIDE_BACKFACE, MA_BM_BLEND, node_locx_image, node_locx_mapping, node_locx_normalmap, node_locx_texcoord, node_locy_step, node_locy_top, Normal, blender::io::obj::MTLMaterial::normal_strength, blender::io::obj::MTLTexMap::projection_type, blender::io::obj::MTLTexMap::scale, set_property_of_socket(), SH_NODE_MAPPING, SH_NODE_NORMAL_MAP, SH_NODE_TEX_COORD, SH_NODE_TEX_IMAGE, SOCK_FLOAT, SOCK_VECTOR, bNode::storage, tex_map_type_to_socket_id, blender::io::obj::MTLMaterial::texture_maps, and blender::io::obj::MTLTexMap::translation.
Referenced by create_mtl_node_tree().
Definition at line 159 of file obj_import_mtl.cc.
References bNode::location, blender::bke::node_add_static_node(), x, and y.
Referenced by add_image_textures(), and create_mtl_node_tree().
| bool blender::io::obj::append_frame_to_filename | ( | const char * | filepath, |
| int | frame, | ||
| char | r_filepath_with_frames[1024] ) |
Append the current frame number in the .OBJ file name.
| r_filepath_with_frames | The result of the filepath with its "#" characters replaced by the number representing frame, and with an .obj extension. |
Definition at line 326 of file obj_exporter.cc.
References BLI_path_extension_replace(), BLI_path_extension_strip(), BLI_path_frame(), BLI_strncpy(), and FILE_MAX.
Referenced by exporter_main(), TEST(), TEST(), and TEST().
| blender::io::obj::BLI_STATIC_ASSERT | ( | ARRAY_SIZE(tex_map_type_to_socket_id) | = =int(MTLTexMapType::Count), |
| "array size mismatch" | ) |
References Count, and tex_map_type_to_socket_id.
| blender::io::obj::BLI_STATIC_ASSERT | ( | ARRAY_SIZE(tex_map_type_to_string) | = =int(MTLTexMapType::Count), |
| "array size mismatch" | ) |
References Count, and tex_map_type_to_string.
|
static |
Definition at line 231 of file obj_export_file_writer.cc.
References chunk_size, and count.
Referenced by obj_parallel_chunked_output().
|
static |
Copy a float property of the given type from the bNode to given buffer.
Definition at line 46 of file obj_export_mtl.cc.
References BLI_assert, copy_v3_v3(), blender::MutableSpan< T >::data(), bNodeSocket::default_value, blender::bke::node_find_socket(), blender::MutableSpan< T >::size(), SOCK_FLOAT, SOCK_IN, SOCK_RGBA, SOCK_VECTOR, bNodeSocket::type, bNodeSocketValueFloat::value, bNodeSocketValueRGBA::value, and bNodeSocketValueVector::value.
Referenced by store_bsdf_properties(), and store_image_textures().
|
static |
Based on the properties of the given Geometry instance, create a new Geometry instance or return the previous one.
Definition at line 38 of file obj_import_file_reader.cc.
References blender::io::obj::Geometry::edges_, blender::io::obj::Geometry::face_elements_, GEOM_CURVE, GEOM_MESH, blender::io::obj::Geometry::geom_type_, blender::io::obj::Geometry::geometry_name_, and blender::StringRefBase::is_empty().
Referenced by geom_new_object(), geom_set_curve_type(), and blender::io::obj::OBJParser::parse().
| bNodeTree * blender::io::obj::create_mtl_node_tree | ( | Main * | bmain, |
| const MTLMaterial & | mtl_mat, | ||
| Material * | mat, | ||
| bool | relative_paths ) |
Definition at line 430 of file obj_import_mtl.cc.
References add_image_textures(), add_node(), Material::id, link_sockets(), node_locx_bsdf, node_locx_output, node_locy_top, blender::bke::node_set_active(), blender::bke::node_tree_add_tree_embedded(), ntreeType_Shader, output, set_bsdf_socket_values(), SH_NODE_BSDF_PRINCIPLED, and SH_NODE_OUTPUT_MATERIAL.
Referenced by get_or_create_material().
|
static |
Definition at line 84 of file obj_import_mtl.cc.
References BKE_image_add_generated(), BLI_path_basename(), Image::filepath, IMA_GENTYPE_BLANK, IMA_SRC_FILE, Image::source, and STRNCPY().
Referenced by load_texture_image().
|
static |
Get the number of control points repeated for a cyclic curve given the multiplicity at the end of the knot vectors (multiplicity at both ends need to match).
Definition at line 90 of file obj_import_nurbs.cc.
Referenced by detect_knot_mode_cyclic().
|
static |
Definition at line 151 of file obj_import_nurbs.cc.
References blender::Span< T >::first(), and blender::Span< T >::last().
|
static |
Definition at line 209 of file obj_import_nurbs.cc.
References blender::Span< T >::drop_back(), blender::Span< T >::drop_front(), blender::Span< T >::first(), and blender::Span< T >::last().
|
static |
Definition at line 157 of file obj_import_nurbs.cc.
References abs, cyclic_repeated_points(), blender::IndexRange::drop_back(), e, blender::Span< T >::first(), i, blender::Span< T >::index_range(), indices, blender::Span< T >::last(), and blender::Span< T >::take_back().
|
static |
Definition at line 224 of file obj_import_nurbs.cc.
References abs, blender::Span< T >::drop_back(), blender::IndexRange::drop_front(), blender::Span< T >::drop_front(), e, i, blender::Span< T >::index_range(), and blender::Span< T >::size().
| 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 272 of file obj_exporter.cc.
References BKE_reportf(), OBJExportParams::blen_filepath, BLI_assert_msg, BLI_path_normalize(), BLI_path_slash_native(), BLI_path_split_dir_part(), depsgraph, OBJExportParams::export_material_groups, OBJExportParams::export_materials, OBJExportParams::export_pbr_extensions, OBJExportParams::file_base_for_tests, FILE_MAX, OBJExportParams::filepath, filter_supported_objects(), OBJExportParams::path_mode, print_exception_error(), OBJExportParams::reports, RPT_ERROR, RPT_WARNING, STRNCPY(), write_mesh_objects(), and write_nurbs_curve_objects().
Referenced by blender::io::obj::OBJExportRegressionTest::compare_obj_export_to_golden(), and 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 336 of file obj_exporter.cc.
References append_frame_to_filename(), BKE_libblock_find_name(), BKE_reportf(), C, RenderData::cfra, CLOG_ERROR, OBJExportParams::collection, CTX_data_main(), DEG_get_input_scene(), OBJExportParams::end_frame, OBJExportParams::export_animation, OBJExportParams::export_eval_mode, export_frame(), FILE_MAX, OBJExportParams::filepath, blender::io::obj::OBJDepsgraph::get(), ID_GR, LOG, blender::ed::object::mode_set(), OB_MODE_OBJECT, Scene::r, OBJExportParams::reports, RPT_ERROR, OBJExportParams::start_frame, and blender::io::obj::OBJDepsgraph::update_for_newframe().
Referenced by OBJ_export().
| 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.
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 107 of file obj_exporter.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BASE_SELECTED, 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, DEGObjectIterSettings::depsgraph, depsgraph, OBJExportParams::export_curves_as_nurbs, OBJExportParams::export_selected_objects, ListBase::first, DEGObjectIterSettings::flags, is_curve_nurbs_compatible(), Curve::nurb, OB_CURVES_LEGACY, OB_MESH, and OB_SURF.
Referenced by export_frame(), TEST_F(), TEST_F(), and TEST_F().
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 176 of file obj_export_mtl.cc.
References SH_NODE_BSDF_PRINCIPLED, and bNode::typeinfo.
Referenced by mtlmaterial_for_material().
|
static |
Definition at line 40 of file obj_importer.cc.
References BKE_collection_add(), Collection::children, OBJImportParams::collection_separator, GS, ID_GR, LISTBASE_FOREACH, and STREQ.
Referenced by geometry_to_blender_objects().
| Vector< Vector< int > > blender::io::obj::fixup_invalid_face | ( | Span< float3float3 > | vert_positions, |
| Span< int > | face_verts ) |
Given an invalid face (with holes or duplicated vertex indices), turn it into possibly multiple faces that are valid.
| vert_coords | Polygon's vertex coordinate list. |
| face_vert_indices | A face's indices that index into the given vertex coordinate list. |
Definition at line 28 of file importer_mesh_utils.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), axis_dominant_v3_to_m3(), BLI_assert, CDT_CONSTRAINTS_VALID_BMESH_WITH_HOLES, blender::meshintersect::delaunay_2d_calc(), blender::meshintersect::CDT_result< T >::face, blender::bke::mesh::face_normal_calc(), faces, blender::Array< T, InlineBufferCapacity, Allocator >::first(), i, blender::Span< T >::index_range(), input, mul_v2_m3v3(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::Span< T >::size(), and blender::meshintersect::CDT_result< T >::vert_orig.
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 542 of file obj_export_file_writer.cc.
|
static |
Definition at line 356 of file obj_import_file_reader.cc.
References Vector< T, InlineBufferCapacity, Allocator >::append(), CLOG_ERROR, CLOG_WARN, blender::io::drop_whitespace(), FLT_MAX, LOG, blender::io::obj::Geometry::nurbs_element_, blender::io::obj::NurbsElement::parm, and blender::io::parse_float().
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 336 of file obj_import_file_reader.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::io::obj::NurbsElement::curv_indices, INT32_MAX, blender::io::obj::Geometry::nurbs_element_, blender::io::parse_floats(), blender::io::parse_int(), blender::io::obj::NurbsElement::range, and blender::io::obj::GlobalVertices::vertices.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 98 of file obj_import_file_reader.cc.
References blender::io::drop_whitespace(), ELEM, blender::io::obj::GlobalVertices::mrgb_block, and srgb_to_linearrgb_uchar4().
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 208 of file obj_import_file_reader.cc.
References CLOG_WARN, blender::io::obj::FaceElem::corner_count_, blender::io::drop_non_whitespace(), blender::io::drop_whitespace(), blender::io::obj::Geometry::face_corners_, blender::io::obj::Geometry::face_elements_, blender::io::obj::Geometry::has_invalid_faces_, blender::io::obj::Geometry::has_vertex_groups_, INT32_MAX, LOG, blender::io::obj::FaceElem::material_index, blender::io::parse_int(), blender::io::obj::FaceElem::shaded_smooth, blender::io::obj::FaceElem::start_index_, blender::io::obj::Geometry::total_corner_, blender::io::obj::Geometry::track_vertex_index(), blender::io::obj::FaceCorner::uv_vert_index, blender::io::obj::GlobalVertices::uv_vertices, blender::io::obj::FaceCorner::vert_index, blender::io::obj::GlobalVertices::vert_normals, blender::io::obj::FaceElem::vertex_group_index, blender::io::obj::FaceCorner::vertex_normal_index, and blender::io::obj::GlobalVertices::vertices.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Parse a polyline and add its line segments as loose edges. We support the following polyline specifications:
Definition at line 174 of file obj_import_file_reader.cc.
References CLOG_WARN, blender::io::drop_non_whitespace(), blender::io::drop_whitespace(), blender::io::obj::Geometry::edges_, INT32_MAX, LOG, parse_vertex_index(), blender::io::obj::Geometry::track_vertex_index(), and blender::io::obj::GlobalVertices::vertices.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 138 of file obj_import_file_reader.cc.
References blender::io::parse_floats(), and blender::io::obj::GlobalVertices::uv_vertices.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 73 of file obj_import_file_reader.cc.
References blender::io::obj::GlobalVertices::flush_mrgb_block(), blender::io::parse_floats(), blender::io::obj::GlobalVertices::set_vertex_color(), blender::io::obj::GlobalVertices::set_vertex_weight(), srgb_to_linearrgb_v3_v3(), UNUSED_VARS, and blender::io::obj::GlobalVertices::vertices.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 125 of file obj_import_file_reader.cc.
References normalize_v3(), blender::io::parse_floats(), and blender::io::obj::GlobalVertices::vert_normals.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 409 of file obj_import_file_reader.cc.
References create_geometry(), and GEOM_MESH.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 331 of file obj_import_file_reader.cc.
References blender::io::obj::NurbsElement::degree, blender::io::obj::Geometry::nurbs_element_, and blender::io::parse_int().
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 315 of file obj_import_file_reader.cc.
References CLOG_WARN, create_geometry(), blender::io::drop_whitespace(), GEOM_CURVE, blender::io::obj::NurbsElement::group_, LOG, and blender::io::obj::Geometry::nurbs_element_.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 382 of file obj_import_file_reader.cc.
References blender::StringRefBase::find().
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 394 of file obj_import_file_reader.cc.
References blender::io::drop_whitespace(), blender::io::parse_int(), and blender::StringRefBase::startswith().
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 82 of file obj_importer.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::io::obj::CurveFromGeometry::create_curve(), blender::io::obj::MeshFromGeometry::create_mesh(), blender::bke::curve_legacy_to_curves(), blender::bke::GeometrySet::from_curves(), blender::bke::GeometrySet::from_mesh(), GEOM_CURVE, GEOM_MESH, and blender::bke::GeometrySet::name.
Referenced by importer_geometry().
|
static |
Make Blender Mesh, Curve etc from Geometry and add them to the import collection.
Definition at line 110 of file obj_importer.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), b, BKE_collection_object_add(), BKE_layer_collection_get_active(), BKE_object_boundbox_get(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), BKE_view_layer_synced_ensure(), OBJImportParams::clamp_size, col, LayerCollection::collection, copy_v3_fl(), blender::io::obj::CurveFromGeometry::create_curve_object(), blender::io::obj::MeshFromGeometry::create_mesh_object(), DEG_id_tag_update(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), find_or_create_collection(), GEOM_CURVE, GEOM_MESH, OBJImportParams::global_scale, Scene::id, ID_RECALC_ANIMATION, ID_RECALC_BASE_FLAGS, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, ID_RECALC_TRANSFORM, blender::bounds::merge(), blender::parallel_sort(), blender::math::reduce_max(), and blender::Vector< T, InlineBufferCapacity, Allocator >::reserve().
Referenced by importer_main().
| std::string blender::io::obj::get_geometry_name | ( | const std::string & | full_name, |
| char | separator ) |
Definition at line 105 of file importer_mesh_utils.cc.
References pos.
Referenced by blender::io::obj::CurveFromGeometry::create_curve_object(), and blender::io::obj::MeshFromGeometry::create_mesh_object().
|
static |
Definition at line 136 of file obj_export_mtl.cc.
References BKE_image_has_filepath(), BKE_image_has_packedfile(), BLI_path_basename(), BLI_path_sequence_decode(), BLI_path_sequence_encode(), CLOG_INFO, FILE_MAX, Image::filepath, bNode::id, IMA_SRC_SEQUENCE, LOG, Image::source, bNode::storage, and STRNCPY().
Referenced by store_image_textures().
|
static |
From a list of sockets, get the parent node which is of the given node type.
Definition at line 121 of file obj_export_mtl.cc.
References bNode::typeinfo.
Referenced by store_image_textures().
|
static |
Definition at line 354 of file obj_import_mesh.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BKE_material_add(), BKE_ntree_update_after_single_tree_change(), create_mtl_node_tree(), Material::id, id_us_min(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), Material::nodetree, and Material::use_nodes.
|
static |
Definition at line 348 of file obj_export_file_writer.cc.
References blender::io::obj::OBJMesh::is_ith_face_smooth(), blender::io::obj::OBJMesh::ith_smooth_group(), NEGATIVE_INIT, params, SMOOTH_GROUP_DEFAULT, and SMOOTH_GROUP_DISABLED.
Referenced by blender::io::obj::OBJWriter::write_face_elements().
|
static |
Definition at line 78 of file obj_import_nurbs.cc.
References element.
| void blender::io::obj::importer_geometry | ( | const OBJImportParams & | import_params, |
| Vector< bke::GeometrySet > & | geometries, | ||
| size_t | read_buffer_size ) |
Definition at line 190 of file obj_importer.cc.
References geometry_to_blender_geometry_set(), and blender::io::obj::OBJParser::parse().
Referenced by OBJ_import_geometries().
| void blender::io::obj::importer_main | ( | bContext * | C, |
| const OBJImportParams & | import_params ) |
Definition at line 205 of file obj_importer.cc.
References C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), and importer_main().
Referenced by importer_main(), and OBJ_import().
| void blender::io::obj::importer_main | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| const OBJImportParams & | import_params, | ||
| size_t | read_buffer_size ) |
Definition at line 213 of file obj_importer.cc.
References BKE_view_layer_base_deselect_all(), OBJImportParams::clear_selection, OBJImportParams::filepath, geometry_to_blender_objects(), blender::io::obj::OBJParser::mtl_libraries(), blender::io::obj::OBJParser::parse(), and blender::io::obj::MTLParser::parse_and_store().
|
static |
Definition at line 90 of file obj_exporter.cc.
References CU_BEZIER, Nurb::next, Nurb::pntsv, and Nurb::type.
Referenced by filter_supported_objects().
|
static |
Definition at line 688 of file obj_export_file_writer.cc.
References Reflection, and SpecularExponent.
Referenced by blender::io::obj::MTLWriter::write_materials().
|
static |
Definition at line 682 of file obj_export_file_writer.cc.
References Metallic, Roughness, and Sheen.
Referenced by blender::io::obj::MTLWriter::write_materials().
|
static |
Definition at line 167 of file obj_import_mtl.cc.
References BLI_assert, blender::bke::node_add_link(), blender::bke::node_find_socket(), SOCK_IN, and SOCK_OUT.
Referenced by add_image_textures(), and create_mtl_node_tree().
|
static |
Collect all the source sockets linked to the destination socket in a destination node.
Definition at line 93 of file obj_export_mtl.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Span< T >::first(), bNode::idname, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), and STREQ.
Referenced by store_image_textures().
|
static |
Definition at line 69 of file obj_import_mtl.cc.
References BKE_image_load_exists(), BKE_main_blendfile_path(), BLI_path_normalize(), BLI_path_rel(), CLOG_INFO, CLOG_WARN, Image::filepath, and LOG.
Referenced by load_texture_image().
|
static |
Definition at line 103 of file obj_import_mtl.cc.
References BLI_path_basename(), create_placeholder_image(), ELEM, blender::io::obj::MTLTexMap::image_path, load_image_at_path(), and blender::io::obj::MTLTexMap::mtl_dir_path.
Referenced by add_image_textures().
|
static |
Definition at line 690 of file obj_import_file_reader.cc.
References Alpha, Color, Count, Emission, Metallic, Normal, parse_keyword(), Reflection, Roughness, Sheen, Specular, and SpecularExponent.
Referenced by parse_texture_map().
| MTLMaterial blender::io::obj::mtlmaterial_for_material | ( | const Material * | material | ) |
Definition at line 379 of file obj_export_mtl.cc.
References BLI_assert, find_bsdf_node(), Material::id, blender::io::obj::MTLMaterial::name, ID::name, Material::nodetree, store_bsdf_properties(), and store_image_textures().
Referenced by blender::io::obj::MTLWriter::add_materials().
| void blender::io::obj::obj_parallel_chunked_output | ( | FormatHandler & | fh, |
| int | tot_count, | ||
| const Function & | function ) |
Definition at line 243 of file obj_export_file_writer.cc.
References blender::io::obj::FormatHandler::append_from(), buffers, calc_chunk_count(), chunk_size, i, and blender::threading::parallel_for().
Referenced by blender::io::obj::OBJWriter::write_face_elements(), blender::io::obj::OBJWriter::write_normals(), blender::io::obj::OBJWriter::write_uv_coords(), and blender::io::obj::OBJWriter::write_vertex_coords().
|
static |
Definition at line 449 of file obj_import_file_reader.cc.
References blender::StringRefBase::data(), and blender::StringRefBase::size().
Referenced by mtl_line_start_to_texture_type(), blender::io::obj::OBJParser::parse(), blender::io::obj::MTLParser::parse_and_store(), and parse_texture_option().
|
static |
Definition at line 785 of file obj_import_file_reader.cc.
References CLOG_WARN, Count, blender::io::obj::MTLTexMap::image_path, LOG, blender::io::obj::MTLTexMap::mtl_dir_path, mtl_line_start_to_texture_type(), parse_texture_option(), blender::StringRefBase::startswith(), blender::io::obj::MTLMaterial::tex_map_of_type(), and blender::StringRefBase::trim().
Referenced by blender::io::obj::MTLParser::parse_and_store().
|
static |
Definition at line 739 of file obj_import_file_reader.cc.
References CLOG_WARN, blender::io::drop_non_whitespace(), blender::io::drop_whitespace(), i, LOG, blender::io::obj::MTLMaterial::normal_strength, blender::io::parse_float(), blender::io::parse_floats(), parse_keyword(), blender::io::obj::MTLTexMap::projection_type, blender::io::obj::MTLTexMap::scale, SHD_PROJ_SPHERE, blender::StringRefBase::startswith(), blender::io::obj::MTLTexMap::translation, and unsupported_texture_options.
Referenced by parse_texture_map().
|
static |
Parse vertex index and transform to non-negative, zero-based. Sets r_index to the index or INT32_MAX on error. Index is transformed and bounds-checked using n_vertices, which specifies the number of vertices that have been read before. Returns updated p.
Definition at line 152 of file obj_import_file_reader.cc.
References CLOG_WARN, INT32_MAX, LOG, and blender::io::parse_int().
Referenced by geom_add_polyline().
|
static |
Definition at line 85 of file obj_exporter.cc.
References CLOG_ERROR, and LOG.
Referenced by export_frame().
|
static |
Definition at line 123 of file obj_exporter_tests.cc.
References BLI_file_read_text_as_mem(), and MEM_freeN().
Referenced by blender::io::obj::OBJExportRegressionTest::compare_obj_export_to_golden(), TEST_F(), and TEST_F().
|
static |
Definition at line 310 of file obj_export_mesh.cc.
References round_float3_to_n_digits(), round_float_to_n_digits(), and v.
Referenced by round_float3_to_n_digits(), and blender::io::obj::OBJMesh::store_normal_coords_and_indices().
|
static |
Round f to round_digits decimal digits.
Definition at line 304 of file obj_export_mesh.cc.
References ceilf, powf, and round_float_to_n_digits().
Referenced by round_float3_to_n_digits(), and round_float_to_n_digits().
|
static |
Definition at line 179 of file obj_import_mtl.cc.
References blender::io::obj::MTLMaterial::alpha, blender::io::obj::MTLMaterial::ambient_color, blender::io::obj::MTLMaterial::aniso, blender::io::obj::MTLMaterial::aniso_rot, Material::b, Material::blend_flag, Material::blend_method, blender::io::obj::MTLMaterial::cc_roughness, blender::io::obj::MTLMaterial::cc_thickness, CLOG_WARN, blender::io::obj::MTLMaterial::color, Emission, blender::io::obj::MTLMaterial::emission_color, Material::g, blender::io::obj::MTLMaterial::illum_mode, blender::io::obj::MTLMaterial::ior, blender::io::obj::MTLTexMap::is_valid(), LOG, MA_BL_HIDE_BACKFACE, MA_BM_BLEND, blender::io::obj::MTLMaterial::metallic, Material::metallic, Material::r, blender::io::obj::MTLMaterial::roughness, Material::roughness, set_property_of_socket(), blender::io::obj::MTLMaterial::sheen, SOCK_FLOAT, SOCK_RGBA, blender::io::obj::MTLMaterial::spec_color, blender::io::obj::MTLMaterial::spec_exponent, sqrt, blender::io::obj::MTLMaterial::tex_map_of_type(), and blender::io::obj::MTLMaterial::transmit_color.
Referenced by create_mtl_node_tree().
|
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 35 of file obj_import_mtl.cc.
References BLI_assert, copy_v3_v3(), copy_v4_v4(), blender::Span< T >::data(), bNodeSocket::default_value, blender::bke::node_find_socket(), blender::Span< T >::size(), SOCK_FLOAT, SOCK_IN, SOCK_RGBA, SOCK_VECTOR, bNodeSocket::type, bNodeSocketValueRGBA::value, and bNodeSocketValueVector::value.
Referenced by add_image_textures(), and set_bsdf_socket_values().
|
static |
Definition at line 210 of file obj_export_file_writer.cc.
Referenced by blender::io::obj::OBJWriter::write_face_elements(), and blender::io::obj::OBJWriter::write_object_name().
|
static |
Store properties found either in bNode or material into r_mtl_mat.
Definition at line 196 of file obj_export_mtl.cc.
References Material::a, blender::io::obj::MTLMaterial::alpha, blender::io::obj::MTLMaterial::ambient_color, blender::io::obj::MTLMaterial::aniso, blender::io::obj::MTLMaterial::aniso_rot, Material::b, blender::io::obj::MTLMaterial::cc_roughness, blender::io::obj::MTLMaterial::cc_thickness, blender::io::obj::MTLMaterial::color, copy_property_from_node(), blender::io::obj::MTLMaterial::emission_color, Material::g, blender::io::obj::MTLMaterial::illum_mode, blender::io::obj::MTLMaterial::ior, blender::io::obj::MTLMaterial::metallic, Material::metallic, mul_v3_fl(), Material::r, blender::io::obj::MTLMaterial::roughness, Material::roughness, blender::io::obj::MTLMaterial::sheen, sheen(), SOCK_FLOAT, SOCK_RGBA, Material::spec, blender::io::obj::MTLMaterial::spec_color, blender::io::obj::MTLMaterial::spec_exponent, and blender::io::obj::MTLMaterial::transmit_color.
Referenced by mtlmaterial_for_material().
|
static |
Store image texture options and file-paths in r_mtl_mat.
Definition at line 308 of file obj_export_mtl.cc.
References copy_property_from_node(), Count, Emission, get_image_filepath(), get_node_of_type(), blender::io::obj::MTLTexMap::image_path, linked_sockets_to_dest_id(), Normal, blender::io::obj::MTLMaterial::normal_strength, blender::io::obj::MTLTexMap::scale, SH_NODE_MAPPING, SH_NODE_NORMAL_MAP, SH_NODE_TEX_IMAGE, SOCK_FLOAT, SOCK_VECTOR, tex_map_type_to_socket_id, blender::io::obj::MTLMaterial::texture_maps, and blender::io::obj::MTLTexMap::translation.
Referenced by mtlmaterial_for_material().
|
static |
Definition at line 232 of file obj_exporter_tests.cc.
Referenced by blender::io::obj::OBJExportRegressionTest::compare_obj_export_to_golden().
| blender::io::obj::TEST | ( | obj_exporter_utils | , |
| append_large_positive_frame_to_filename | ) |
Definition at line 112 of file obj_exporter_tests.cc.
References append_frame_to_filename(), FILE_MAX, and SEP_STR.
| blender::io::obj::TEST | ( | obj_exporter_utils | , |
| append_negative_frame_to_filename | ) |
Definition at line 90 of file obj_exporter_tests.cc.
References append_frame_to_filename(), FILE_MAX, and SEP_STR.
| blender::io::obj::TEST | ( | obj_exporter_utils | , |
| append_positive_frame_to_filename | ) |
Definition at line 101 of file obj_exporter_tests.cc.
References append_frame_to_filename(), FILE_MAX, and SEP_STR.
| blender::io::obj::TEST | ( | obj_exporter_writer | , |
| format_handler_buffer_chunking | ) |
Definition at line 206 of file obj_exporter_tests.cc.
References blender::io::obj::FormatHandler::get_as_string(), blender::io::obj::FormatHandler::get_block_count(), blender::io::obj::FormatHandler::write_obj_curve_begin(), blender::io::obj::FormatHandler::write_obj_newline(), blender::io::obj::FormatHandler::write_obj_nurbs_parm(), blender::io::obj::FormatHandler::write_obj_nurbs_parm_begin(), and blender::io::obj::FormatHandler::write_obj_object().
| blender::io::obj::TEST | ( | obj_import | , |
| BufferRefillTest | ) |
Definition at line 21 of file obj_importer_tests.cc.
References CLG_exit(), CLG_init(), EXPECT_EQ(), GEOM_CURVE, params, blender::io::obj::OBJParser::parse(), SEP_STR, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), STRNCPY(), and blender::io::obj::GlobalVertices::vertices.
| blender::io::obj::TEST_F | ( | ObjExporterWriterTest | , |
| header | ) |
Definition at line 170 of file obj_exporter_tests.cc.
References BKE_blender_version_string(), BKE_tempdir_init(), params, read_temp_file_in_string(), and result.
| blender::io::obj::TEST_F | ( | ObjExporterWriterTest | , |
| mtllib | ) |
Definition at line 189 of file obj_exporter_tests.cc.
References params, read_temp_file_in_string(), and result.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_curves | ) |
Definition at line 534 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_curves_as_nurbs | ) |
Definition at line 544 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_objects | ) |
Definition at line 555 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_objects_mat_groups | ) |
Definition at line 568 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_quads | ) |
Definition at line 322 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_tris | ) |
Definition at line 313 of file obj_exporter_tests.cc.
References save_failing_test_output.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_all_data_triangulated | ) |
Definition at line 432 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_loose_edges | ) |
Definition at line 370 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_normal_edit | ) |
Definition at line 445 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_vertex_groups | ) |
Definition at line 458 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_positioned | ) |
Definition at line 472 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_vertex_colors | ) |
Definition at line 484 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_with_textures_relative | ) |
Definition at line 509 of file obj_exporter_tests.cc.
References params, PATH_REFERENCE_STRIP, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_with_textures_strip | ) |
Definition at line 498 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| edges | ) |
Definition at line 345 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| fgons | ) |
Definition at line 333 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| materials_pbr | ) |
Definition at line 592 of file obj_exporter_tests.cc.
References params, PATH_REFERENCE_RELATIVE, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| materials_without_pbr | ) |
Definition at line 581 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| non_uniform_scale | ) |
Definition at line 382 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| nurbs_as_mesh | ) |
Definition at line 419 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| nurbs_as_nurbs | ) |
Definition at line 393 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| nurbs_curves_as_nurbs | ) |
Definition at line 406 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| suzanne_all_data | ) |
Definition at line 520 of file obj_exporter_tests.cc.
References params, PATH_REFERENCE_RELATIVE, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| vertices | ) |
Definition at line 357 of file obj_exporter_tests.cc.
| blender::io::obj::TEST_F | ( | OBJExportTest | , |
| filter_objects_curves_as_mesh | ) |
Definition at line 51 of file obj_exporter_tests.cc.
References all_objects_file, depsgraph, EXPECT_EQ(), filter_supported_objects(), and params.
| blender::io::obj::TEST_F | ( | OBJExportTest | , |
| filter_objects_curves_as_nurbs | ) |
Definition at line 63 of file obj_exporter_tests.cc.
References all_objects_file, depsgraph, EXPECT_EQ(), filter_supported_objects(), and params.
| blender::io::obj::TEST_F | ( | OBJExportTest | , |
| filter_objects_selected | ) |
Definition at line 76 of file obj_exporter_tests.cc.
References all_objects_file, depsgraph, EXPECT_EQ(), filter_supported_objects(), and params.
| blender::io::obj::TEST_F | ( | OBJMTLParserTest | , |
| materials | ) |
Definition at line 145 of file obj_mtl_parser_tests.cc.
References blender::io::obj::MTLMaterial::alpha, blender::io::obj::MTLMaterial::ambient_color, blender::io::obj::MTLMaterial::aniso, blender::io::obj::MTLMaterial::aniso_rot, ARRAY_SIZE, blender::io::obj::MTLMaterial::cc_roughness, blender::io::obj::MTLMaterial::cc_thickness, Color, blender::io::obj::MTLMaterial::color, blender::io::obj::MTLMaterial::emission_color, blender::io::obj::MTLMaterial::illum_mode, blender::io::obj::MTLTexMap::image_path, blender::io::obj::MTLMaterial::ior, blender::io::obj::MTLMaterial::metallic, blender::io::obj::MTLMaterial::name, Normal, blender::io::obj::MTLMaterial::normal_strength, blender::io::obj::MTLTexMap::projection_type, Reflection, blender::io::obj::MTLMaterial::roughness, blender::io::obj::MTLTexMap::scale, SHD_PROJ_SPHERE, blender::io::obj::MTLMaterial::sheen, blender::io::obj::MTLMaterial::spec_color, blender::io::obj::MTLMaterial::spec_exponent, Specular, SpecularExponent, blender::io::obj::MTLMaterial::tex_map_of_type(), blender::io::obj::MTLTexMap::translation, and blender::io::obj::MTLMaterial::transmit_color.
| blender::io::obj::TEST_F | ( | OBJMTLParserTest | , |
| materials_pbr | ) |
Definition at line 251 of file obj_mtl_parser_tests.cc.
References blender::io::obj::MTLMaterial::alpha, blender::io::obj::MTLMaterial::aniso, blender::io::obj::MTLMaterial::aniso_rot, ARRAY_SIZE, blender::io::obj::MTLMaterial::cc_roughness, blender::io::obj::MTLMaterial::cc_thickness, blender::io::obj::MTLMaterial::color, Emission, blender::io::obj::MTLMaterial::emission_color, blender::io::obj::MTLMaterial::illum_mode, blender::io::obj::MTLTexMap::image_path, blender::io::obj::MTLMaterial::ior, blender::io::obj::MTLMaterial::metallic, blender::io::obj::MTLMaterial::name, Roughness, blender::io::obj::MTLMaterial::roughness, Sheen, blender::io::obj::MTLMaterial::sheen, blender::io::obj::MTLMaterial::spec_color, and blender::io::obj::MTLMaterial::tex_map_of_type().
| blender::io::obj::TEST_F | ( | OBJMTLParserTest | , |
| string_newlines_whitespace | ) |
Definition at line 98 of file obj_mtl_parser_tests.cc.
References blender::io::obj::MTLMaterial::ambient_color, ARRAY_SIZE, Color, blender::io::obj::MTLMaterial::color, blender::io::obj::MTLMaterial::illum_mode, blender::io::obj::MTLTexMap::image_path, blender::io::obj::MTLMaterial::name, blender::io::obj::MTLMaterial::spec_color, blender::io::obj::MTLMaterial::spec_exponent, Specular, and blender::io::obj::MTLMaterial::tex_map_of_type().
| void blender::io::obj::transform_object | ( | Object * | object, |
| const OBJImportParams & | import_params ) |
Apply axes transform to the Object, and clamp object dimensions to the specified value.
Definition at line 88 of file importer_mesh_utils.cc.
References BKE_object_apply_mat4(), copy_m4_m3(), OBJImportParams::forward_axis, OBJImportParams::global_scale, IO_AXIS_Y, IO_AXIS_Z, mat3_from_axis_conversion(), rescale_m4(), unit_m3(), unit_m4(), and OBJImportParams::up_axis.
Referenced by blender::io::obj::CurveFromGeometry::create_curve_object(), and blender::io::obj::MeshFromGeometry::create_mesh_object().
|
static |
Definition at line 469 of file obj_import_file_reader.cc.
References GEOM_MESH, blender::io::obj::Geometry::geom_type_, blender::io::obj::Geometry::track_all_vertices(), and blender::io::obj::GlobalVertices::vertices.
Referenced by blender::io::obj::OBJParser::parse().
|
static |
Definition at line 157 of file obj_exporter.cc.
References blender::io::obj::MTLWriter::add_materials(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), b, buffers, count, OBJExportParams::export_colors, OBJExportParams::export_materials, OBJExportParams::export_normals, OBJExportParams::export_smooth_groups, OBJExportParams::export_uv, blender::io::obj::OBJWriter::get_outfile(), i, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::io::obj::MTLWriter::mtl_file_path(), blender::io::obj::MTLWriter::mtlmaterial_name(), blender::io::obj::IndexOffsets::normal_offset, nullptr, blender::threading::parallel_for(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), OBJExportParams::smooth_groups_bitflags, blender::io::obj::IndexOffsets::uv_vertex_offset, blender::io::obj::IndexOffsets::vertex_offset, blender::io::obj::OBJWriter::write_edges_indices(), blender::io::obj::OBJWriter::write_face_elements(), blender::io::obj::OBJWriter::write_mtllib_name(), blender::io::obj::OBJWriter::write_normals(), blender::io::obj::OBJWriter::write_object_name(), blender::io::obj::OBJWriter::write_uv_coords(), and blender::io::obj::OBJWriter::write_vertex_coords().
Referenced by export_frame().
|
static |
Export NURBS Curves in parameter form, not as vertices and edges.
Definition at line 260 of file obj_exporter.cc.
References blender::io::obj::OBJWriter::get_outfile(), blender::io::obj::OBJWriter::write_nurbs_curve(), and blender::io::obj::FormatHandler::write_to_file().
Referenced by export_frame().
| const std::string blender::io::obj::all_objects_file = "io_tests" SEP_STR "blend_scene" SEP_STR "all_objects.blend" |
Definition at line 49 of file obj_exporter_tests.cc.
|
static |
Definition at line 230 of file obj_export_file_writer.cc.
Referenced by calc_chunk_count(), and obj_parallel_chunked_output().
|
static |
Definition at line 46 of file obj_export_file_writer.cc.
Referenced by blender::io::obj::OBJWriter::write_face_elements().
|
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 54 of file obj_export_file_writer.cc.
Referenced by blender::io::obj::OBJWriter::write_face_elements().
| const int blender::io::obj::NEGATIVE_INIT = -10 |
Any negative number other than NOT_FOUND to initialize usually non-negative numbers.
Definition at line 27 of file obj_export_mesh.hh.
Referenced by get_smooth_group(), blender::io::obj::OBJMesh::ith_smooth_group(), and blender::io::obj::OBJWriter::write_face_elements().
| const float blender::io::obj::node_locx_bsdf = 0.0f |
Definition at line 151 of file obj_import_mtl.cc.
Referenced by create_mtl_node_tree().
| const float blender::io::obj::node_locx_image = -480.0f |
Definition at line 149 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locx_mapping = -680.0f |
Definition at line 148 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locx_normalmap = -200.0f |
Definition at line 150 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locx_output = 280.0f |
Definition at line 152 of file obj_import_mtl.cc.
Referenced by create_mtl_node_tree().
| const float blender::io::obj::node_locx_texcoord = -880.0f |
Definition at line 147 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locy_step = 300.0f |
Definition at line 156 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locy_top = 300.0f |
Definition at line 155 of file obj_import_mtl.cc.
Referenced by add_image_textures(), and create_mtl_node_tree().
| const int blender::io::obj::NOT_FOUND = -1 |
Denote absence for usually non-negative numbers.
Definition at line 25 of file obj_export_mesh.hh.
Referenced by blender::io::obj::OBJMesh::get_face_deform_group_index(), and blender::io::obj::OBJWriter::write_face_elements().
|
constexpr |
Definition at line 30 of file obj_exporter_tests.cc.
Referenced by blender::io::obj::OBJExportRegressionTest::compare_obj_export_to_golden(), and TEST_F().
| const int blender::io::obj::SMOOTH_GROUP_DEFAULT = 1 |
Definition at line 44 of file obj_export_file_writer.cc.
Referenced by get_smooth_group().
| 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 43 of file obj_export_file_writer.cc.
Referenced by get_smooth_group().
| const char * blender::io::obj::tex_map_type_to_socket_id |
Definition at line 28 of file obj_export_mtl.cc.
Referenced by add_image_textures(), BLI_STATIC_ASSERT(), and store_image_textures().
|
static |
Definition at line 523 of file obj_export_file_writer.cc.
Referenced by BLI_STATIC_ASSERT().
|
static |
Definition at line 727 of file obj_import_file_reader.cc.
Referenced by parse_texture_option().