|
Blender V5.3
|
Classes | |
| class | CurveFromGeometry |
| struct | FaceCorner |
| struct | FaceElem |
| class | FormatHandler |
| struct | Geometry |
| struct | GlobalVertices |
| struct | IndexOffsets |
| class | IOBJCurve |
| class | MeshFromGeometry |
| struct | MTLMaterial |
| class | MTLParser |
| struct | MTLTexMap |
| class | MTLWriter |
| struct | NurbsElement |
| class | OBJCurves |
| class | OBJCurvesTest |
| class | OBJDepsgraph |
| class | ObjExporterWriterTest |
| class | OBJExportRegressionTest |
| class | OBJExportTest |
| class | OBJLegacyCurve |
| class | OBJMesh |
| class | OBJMTLParserTest |
| class | OBJParser |
| class | OBJWriter |
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 float4x4 | compute_world_axes_transform (const OBJExportParams &export_params, const float4x4 &object_to_world) |
| 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) |
| 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< IOBJCurve > > > | 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< IOBJCurve > > exportable_as_nurbs, const OBJWriter &obj_writer) |
| static bool | open_stream_writers (const OBJExportParams &export_params, const char *filepath, std::unique_ptr< OBJWriter > &r_frame_writer, std::unique_ptr< MTLWriter > &r_mtl_writer) |
| static void | write_materials (MTLWriter *mtl_writer, const OBJExportParams &export_params) |
| void | export_objects (const OBJExportParams &export_params, const Span< std::unique_ptr< OBJMesh > > meshes, const Span< std::unique_ptr< IOBJCurve > > curves, const char *filepath) |
| 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[FILE_MAX]) |
| void | exporter_main (bContext *C, const OBJExportParams &export_params) |
| bool | append_frame_to_filename (const char *filepath, int frame, char r_filepath_with_frames[1024]) |
| Vector< Vector< int > > | fixup_invalid_face (Span< float3 > 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, 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, 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, eOBJMtlNameCollisionMode mtl_name_collision_mode) |
| 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 | repeating_cyclic_point_num (const int8_t order, const Span< float > knots) |
| static bool | detect_clamped_endpoint (const int8_t degree, const Span< int > multiplicity) |
| static bool | almost_equal_relative (const float a, const float b, const float epsilon) |
| static bool | detect_knot_mode_cyclic (const int8_t degree, const Span< int > indices, const Span< float > knots, const Span< int > multiplicity, const bool is_clamped) |
| static bool | detect_knot_mode_bezier_clamped (const int8_t degree, const int num_points, const Span< int > multiplicity) |
| static bool | detect_knot_mode_uniform (const int8_t degree, const Span< float > knots, const Span< int > multiplicity, const 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) |
| void | importer_main (bContext *C, const OBJImportParams &import_params) |
| 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_F (OBJMTLParserTest, string_newlines_whitespace) | |
| TEST_F (OBJMTLParserTest, materials) | |
| TEST_F (OBJMTLParserTest, materials_pbr) | |
| static OBJExportParams | default_export_params (const std::string &filepath) |
| static OBJImportParams | default_import_params (const std::string &filepath) |
Utility | |
| static int | find_leftmost_span (const int8_t order, const Span< int > multiplicity) |
| static int | find_rightmost_span (const int8_t order, const Span< int > multiplicity) |
| Span< float > | valid_nurb_control_point_range (const int8_t order, const Span< float > knots, IndexRange &point_range) |
Knot vector: KnotMode::NURBS_KNOT_MODE_NORMAL | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_polyline) | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_deg5) | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_clamped_polyline) | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_endpoint_clamped_deg3) | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_endpoint_clamped_deg5) | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_cyclic_polyline) | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_cyclic_deg4) | |
| TEST_F (OBJCurvesTest, nurbs_io_uniform_cyclic_clamped_deg4) | |
Knot vector: KnotMode::NURBS_KNOT_MODE_ENDPOINT_BEZIER | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_single_segment_deg2) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_single_segment_deg4) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_deg2) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_uneven_deg2) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_deg4) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_cyclic_deg4_looped_12) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_cyclic_deg4_looped_8) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_cyclic_deg4_discontinous_13) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_cyclic_deg4_discontinous_11) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_cyclic_deg4_discontinous_10) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_clamped_cyclic_deg4_discontinous_9) | |
Knot vector: KnotMode::NURBS_KNOT_MODE_BEZIER | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_cyclic_deg4_looped_12) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_cyclic_deg4_looped_discontinous_13) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_cyclic_deg4_looped_discontinous_11) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_cyclic_deg4_looped_discontinous_10) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_cyclic_deg4_looped_discontinous_9) | |
| TEST_F (OBJCurvesTest, nurbs_io_bezier_cyclic_deg4_looped_8) | |
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" |
| const std::array< float3, 13 > | position_array |
| const Span< float3 > | position_data = Span<float3>(position_array) |
<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 float3 &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 21 of file obj_export_mtl.hh.
|
static |
Definition at line 358 of file obj_import_mtl.cc.
References add_image_textures(), add_node(), Alpha, blender::BLI_assert(), Count, blender::bNode::id, blender::io::obj::MTLTexMap::is_valid(), link_sockets(), load_texture_image(), blender::MA_BL_HIDE_BACKFACE, blender::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, blender::SOCK_FLOAT, blender::SOCK_VECTOR, blender::bNode::storage, tex_map_type_to_socket_id, blender::io::obj::MTLMaterial::texture_maps, and blender::io::obj::MTLTexMap::translation.
Referenced by add_image_textures(), and create_mtl_node_tree().
Definition at line 149 of file obj_import_mtl.cc.
References add_node(), node, blender::bke::node_add_static_node(), blender::x, and y.
Referenced by add_image_textures(), add_node(), and create_mtl_node_tree().
|
static |
Definition at line 210 of file obj_import_nurbs.cc.
References almost_equal_relative(), and b.
Referenced by almost_equal_relative(), detect_knot_mode_cyclic(), and detect_knot_mode_uniform().
| bool blender::io::obj::append_frame_to_filename | ( | const char * | filepath, |
| const int | frame, | ||
| char | r_filepath_with_frames[FILE_MAX] ) |
Definition at line 364 of file obj_exporter.cc.
References append_frame_to_filename(), blender::BLI_path_extension_replace(), blender::BLI_path_extension_strip(), blender::BLI_path_frame(), blender::BLI_strncpy(), and FILE_MAX.
Referenced by append_frame_to_filename(), append_frame_to_filename(), exporter_main(), TEST(), TEST(), and TEST().
| 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. |
References append_frame_to_filename().
| blender::io::obj::BLI_STATIC_ASSERT | ( | ARRAY_SIZE(tex_map_type_to_socket_id) | = =int(MTLTexMapType::Count), |
| "array size mismatch" | ) |
References blender::ARRAY_SIZE(), BLI_STATIC_ASSERT(), 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 blender::ARRAY_SIZE(), BLI_STATIC_ASSERT(), Count, and tex_map_type_to_string.
Referenced by BLI_STATIC_ASSERT(), and BLI_STATIC_ASSERT().
|
static |
Definition at line 239 of file obj_export_file_writer.cc.
References calc_chunk_count(), and chunk_size.
Referenced by calc_chunk_count(), and obj_parallel_chunked_output().
|
static |
Definition at line 468 of file obj_export_file_writer.cc.
References compute_world_axes_transform(), blender::OBJExportParams::forward_axis, blender::OBJExportParams::global_scale, blender::IO_AXIS_Y, blender::IO_AXIS_Z, blender::mat3_from_axis_conversion(), blender::mul_m4_m3m4(), blender::mul_v3_fl(), blender::mul_v3_m3v3(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::unit_m3(), and blender::OBJExportParams::up_axis.
Referenced by compute_world_axes_transform(), and blender::io::obj::OBJWriter::write_nurbs_curve().
|
static |
Copy a float property of the given type from the bNode to given buffer.
Definition at line 49 of file obj_export_mtl.cc.
References blender::BLI_assert(), copy_property_from_node(), blender::copy_v3_v3(), blender::MutableSpan< T >::data(), blender::bNodeSocket::default_value, node, blender::bke::node_find_socket(), blender::MutableSpan< T >::size(), blender::SOCK_FLOAT, blender::SOCK_IN, blender::SOCK_RGBA, blender::SOCK_VECTOR, blender::bNodeSocket::type, blender::UString::UString(), blender::bNodeSocketValueFloat::value, blender::bNodeSocketValueRGBA::value, and blender::bNodeSocketValueVector::value.
Referenced by copy_property_from_node(), 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 51 of file obj_import_file_reader.cc.
References create_geometry(), 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::blender::StringRefBase::is_empty().
Referenced by create_geometry(), 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 420 of file obj_import_mtl.cc.
References add_image_textures(), add_node(), blender::BLI_assert(), create_mtl_node_tree(), link_sockets(), node_locx_bsdf, node_locx_output, node_locy_top, blender::bke::node_set_active(), output, set_bsdf_socket_values(), SH_NODE_BSDF_PRINCIPLED, and SH_NODE_OUTPUT_MATERIAL.
Referenced by create_mtl_node_tree(), and get_or_create_material().
|
static |
Definition at line 87 of file obj_import_mtl.cc.
References blender::BKE_image_load_exists(), and create_placeholder_image().
Referenced by create_placeholder_image(), and load_texture_image().
|
static |
Definition at line 20 of file obj_nurbs_io_tests.cc.
References default_export_params(), blender::OBJExportParams::filepath, blender::OBJExportParams::forward_axis, blender::IO_AXIS_Y, blender::IO_AXIS_Z, blender::STRNCPY(), and blender::OBJExportParams::up_axis.
Referenced by default_export_params(), and blender::io::obj::OBJCurvesTest::run_nurbs_test().
|
static |
Definition at line 29 of file obj_nurbs_io_tests.cc.
References default_import_params(), blender::OBJImportParams::filepath, blender::OBJImportParams::forward_axis, blender::IO_AXIS_Y, blender::IO_AXIS_Z, blender::STRNCPY(), and blender::OBJImportParams::up_axis.
Referenced by default_import_params(), and blender::io::obj::OBJCurvesTest::run_nurbs_test().
|
static |
Definition at line 195 of file obj_import_nurbs.cc.
References detect_clamped_endpoint(), blender::Span< T >::first(), and blender::Span< T >::last().
Referenced by detect_clamped_endpoint().
|
static |
Definition at line 265 of file obj_import_nurbs.cc.
References detect_knot_mode_bezier_clamped(), blender::Span< T >::drop_back(), blender::Span< T >::drop_front(), blender::Span< T >::first(), blender::Span< T >::last(), and blender::Span< T >::size().
Referenced by detect_knot_mode_bezier_clamped().
|
static |
Definition at line 216 of file obj_import_nurbs.cc.
References almost_equal_relative(), blender::BLI_assert(), detect_knot_mode_cyclic(), blender::IndexRange::drop_back(), blender::Span< T >::drop_back(), blender::Span< T >::drop_front(), blender::e, blender::Span< T >::first(), blender::Span< T >::index_range(), blender::Span< T >::last(), repeating_cyclic_point_num(), and blender::Span< T >::take_back().
Referenced by detect_knot_mode_cyclic().
|
static |
Definition at line 323 of file obj_import_nurbs.cc.
References almost_equal_relative(), detect_knot_mode_uniform(), blender::Span< T >::drop_back(), blender::IndexRange::drop_front(), blender::Span< T >::drop_front(), blender::e, blender::Span< T >::first(), blender::Span< T >::index_range(), blender::Span< T >::last(), and blender::Span< T >::size().
Referenced by detect_knot_mode_uniform().
| 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 Dependency Graph. 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 351 of file obj_exporter.cc.
References blender::BKE_reportf(), export_frame(), export_objects(), filter_supported_objects(), blender::OBJExportParams::reports, and blender::RPT_WARNING.
Referenced by blender::io::obj::OBJExportRegressionTest::compare_obj_export_to_golden(), export_frame(), and exporter_main().
| void blender::io::obj::export_objects | ( | const OBJExportParams & | export_params, |
| const Span< std::unique_ptr< OBJMesh > > | meshes, | ||
| const Span< std::unique_ptr< IOBJCurve > > | curves, | ||
| const char * | filepath ) |
Definition at line 330 of file obj_exporter.cc.
References blender::OBJExportParams::export_materials, export_objects(), open_stream_writers(), write_materials(), write_mesh_objects(), and write_nurbs_curve_objects().
Referenced by export_frame(), export_objects(), and blender::io::obj::OBJCurvesTest::write_curves().
| 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 374 of file obj_exporter.cc.
References append_frame_to_filename(), blender::BKE_libblock_find_name(), blender::BKE_reportf(), C, blender::RenderData::cfra, CLOG_ERROR, blender::OBJExportParams::collection, blender::CTX_data_main(), blender::DEG_get_input_scene(), blender::OBJExportParams::end_frame, blender::OBJExportParams::export_animation, blender::OBJExportParams::export_eval_mode, export_frame(), exporter_main(), FILE_MAX, blender::OBJExportParams::filepath, blender::io::obj::OBJDepsgraph::get(), blender::ID_GR, blender::LOG, blender::ed::object::mode_set(), blender::OB_MODE_OBJECT, blender::Scene::r, blender::OBJExportParams::reports, blender::RPT_ERROR, blender::OBJExportParams::start_frame, and blender::io::obj::OBJDepsgraph::update_for_newframe().
Referenced by exporter_main(), and blender::OBJ_export().
| std::pair< Vector< std::unique_ptr< OBJMesh > >, Vector< std::unique_ptr< IOBJCurve > > > 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 graphDependency Graph, 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 113 of file obj_exporter.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BASE_SELECTED, blender::DEG_ITER_OBJECT_FLAG_DUPLI, blender::DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, blender::DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET, blender::DEG_ITER_OBJECT_FLAG_VISIBLE, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, blender::DEGObjectIterSettings::depsgraph, blender::OBJExportParams::export_curves_as_nurbs, blender::OBJExportParams::export_selected_objects, filter_supported_objects(), blender::DEGObjectIterSettings::flags, is_curve_nurbs_compatible(), blender::Curve::nurb, blender::OB_CURVES_LEGACY, blender::OB_MESH, blender::OB_SURF, and blender::io::obj::OBJLegacyCurve::OBJLegacyCurve().
Referenced by export_frame(), filter_supported_objects(), 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 178 of file obj_export_mtl.cc.
References find_bsdf_node(), node, SH_NODE_BSDF_PRINCIPLED, blender::bke::bNodeType::type_legacy, and blender::bNode::typeinfo.
Referenced by find_bsdf_node(), and mtlmaterial_for_material().
|
static |
Find the multiplicity entry with the valid span occurring on the right side of the related break-point/knot.
Definition at line 33 of file obj_export_nurbs.cc.
References blender::BLI_assert(), and find_leftmost_span().
Referenced by find_leftmost_span(), and valid_nurb_control_point_range().
|
static |
Definition at line 49 of file obj_importer.cc.
References blender::BKE_collection_add(), blender::Collection::children, blender::CollectionChild::collection, blender::OBJImportParams::collection_separator, find_or_create_collection(), blender::GS(), blender::Collection::id, blender::ID_GR, blender::ID::name, and STREQ.
Referenced by find_or_create_collection(), and geometry_to_blender_objects().
|
static |
Find the multiplicity entry with the valid span occurring on the left side of the related break-point/knot.
Definition at line 48 of file obj_export_nurbs.cc.
References blender::BLI_assert(), find_rightmost_span(), and blender::Span< T >::size().
Referenced by find_rightmost_span(), and valid_nurb_control_point_range().
| Vector< Vector< int > > blender::io::obj::fixup_invalid_face | ( | Span< float3 > | 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_positions | Polygon's vertex coordinate list. |
| face_verts | 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(), blender::axis_dominant_v3_to_m3(), blender::Array< T, InlineBufferCapacity, Allocator >::begin(), blender::BLI_assert(), blender::CDT_CONSTRAINTS_VALID_BMESH_WITH_HOLES, blender::CDT_ONLY_ONE_ORIG, blender::CDT_ORIG_VERTS, blender::meshintersect::delaunay_2d_calc(), blender::Array< T, InlineBufferCapacity, Allocator >::end(), blender::meshintersect::CDT_input< T >::epsilon, blender::meshintersect::CDT_result< T >::face, blender::bke::mesh::face_normal_calc(), blender::meshintersect::CDT_input< T >::face_offsets, blender::meshintersect::CDT_input< T >::face_vert_indices, fixup_invalid_face(), blender::Span< T >::index_range(), blender::mul_v2_m3v3(), blender::meshintersect::CDT_input< T >::needed_ids, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::Span< T >::size(), blender::meshintersect::CDT_input< T >::vert, and blender::meshintersect::CDT_result< T >::vert_orig.
Referenced by fixup_invalid_face().
|
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 581 of file obj_export_file_writer.cc.
References float3_to_string().
Referenced by float3_to_string().
|
static |
Definition at line 372 of file obj_import_file_reader.cc.
References CLOG_ERROR, CLOG_WARN, blender::io::drop_whitespace(), FLT_MAX, geom_add_curve_parameters(), blender::LOG, blender::io::obj::Geometry::nurbs_element_, blender::io::obj::NurbsElement::parm, and blender::io::parse_float().
Referenced by geom_add_curve_parameters().
|
static |
Definition at line 349 of file obj_import_file_reader.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::io::obj::NurbsElement::curv_indices, geom_add_curve_vertex_indices(), blender::io::validate::index_in_range(), 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 geom_add_curve_vertex_indices().
|
static |
Definition at line 111 of file obj_import_file_reader.cc.
References blender::io::drop_whitespace(), ELEM, geom_add_mrgb_colors(), blender::io::obj::GlobalVertices::mrgb_block, and blender::srgb_to_linearrgb_uchar4().
Referenced by geom_add_mrgb_colors().
|
static |
Definition at line 221 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_, geom_add_polygon(), blender::io::obj::Geometry::has_invalid_faces_, blender::io::obj::Geometry::has_vertex_groups_, INT32_MAX, blender::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 geom_add_polygon().
|
static |
Parse a polyline and add its line segments as loose edges. We support the following polyline specifications:
Definition at line 187 of file obj_import_file_reader.cc.
References CLOG_WARN, blender::io::drop_non_whitespace(), blender::io::drop_whitespace(), blender::io::obj::Geometry::edges_, geom_add_polyline(), INT32_MAX, blender::LOG, parse_vertex_index(), blender::io::obj::Geometry::track_vertex_index(), and blender::io::obj::GlobalVertices::vertices.
Referenced by geom_add_polyline().
|
static |
Definition at line 151 of file obj_import_file_reader.cc.
References geom_add_uv_vertex(), blender::io::parse_floats(), and blender::io::obj::GlobalVertices::uv_vertices.
Referenced by geom_add_uv_vertex().
|
static |
Definition at line 86 of file obj_import_file_reader.cc.
References blender::io::obj::GlobalVertices::flush_mrgb_block(), geom_add_vertex(), blender::io::parse_floats(), blender::io::obj::GlobalVertices::set_vertex_color(), blender::io::obj::GlobalVertices::set_vertex_weight(), blender::srgb_to_linearrgb_v3_v3(), UNUSED_VARS, and blender::io::obj::GlobalVertices::vertices.
Referenced by geom_add_vertex().
|
static |
Definition at line 138 of file obj_import_file_reader.cc.
References geom_add_vertex_normal(), blender::normalize_v3(), blender::io::parse_floats(), and blender::io::obj::GlobalVertices::vert_normals.
Referenced by geom_add_vertex_normal().
|
static |
Definition at line 425 of file obj_import_file_reader.cc.
References create_geometry(), GEOM_MESH, geom_new_object(), and blender::StringRef::StringRef().
Referenced by geom_new_object().
|
static |
Definition at line 344 of file obj_import_file_reader.cc.
References blender::io::obj::NurbsElement::degree, geom_set_curve_degree(), blender::io::obj::Geometry::nurbs_element_, and blender::io::parse_int().
Referenced by geom_set_curve_degree().
|
static |
Definition at line 328 of file obj_import_file_reader.cc.
References CLOG_WARN, create_geometry(), blender::io::drop_whitespace(), GEOM_CURVE, geom_set_curve_type(), blender::io::obj::NurbsElement::group_, blender::LOG, blender::io::obj::Geometry::nurbs_element_, and blender::StringRef::StringRef().
Referenced by geom_set_curve_type().
|
static |
Definition at line 398 of file obj_import_file_reader.cc.
References blender::blender::StringRefBase::find(), and geom_update_group().
Referenced by geom_update_group().
|
static |
Definition at line 410 of file obj_import_file_reader.cc.
References blender::io::drop_whitespace(), geom_update_smooth_group(), blender::io::parse_int(), blender::blender::StringRefBase::startswith(), and blender::StringRef::StringRef().
Referenced by geom_update_smooth_group().
|
static |
Definition at line 91 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::GeometrySet::from_curves(), blender::bke::GeometrySet::from_mesh(), GEOM_CURVE, GEOM_MESH, geometry_to_blender_geometry_set(), and blender::bke::GeometrySet::set_name().
Referenced by geometry_to_blender_geometry_set(), and importer_geometry().
|
static |
Make Blender Mesh, Curve etc from Geometry and add them to the import collection.
Definition at line 118 of file obj_importer.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), b, blender::BKE_collection_object_add(), blender::BKE_layer_collection_get_active(), blender::BKE_object_boundbox_get(), blender::BKE_view_layer_base_find(), blender::BKE_view_layer_base_select_and_set_active(), blender::BKE_view_layer_synced_ensure(), blender::OBJImportParams::clamp_size, CLOG_ERROR, blender::LayerCollection::collection, blender::copy_v3_fl(), blender::io::obj::CurveFromGeometry::create_curve_object(), blender::io::obj::MeshFromGeometry::create_mesh_object(), blender::DEG_id_tag_update(), blender::DEG_id_tag_update_ex(), blender::DEG_relations_tag_update(), find_or_create_collection(), GEOM_CURVE, GEOM_MESH, geometry_to_blender_objects(), blender::OBJImportParams::global_scale, blender::Scene::id, blender::ID_RECALC_ANIMATION, blender::ID_RECALC_BASE_FLAGS, blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SYNC_TO_EVAL, blender::ID_RECALC_TRANSFORM, blender::LOG, blender::bounds::merge(), blender::parallel_sort(), blender::math::reduce_max(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), and scale().
Referenced by geometry_to_blender_objects(), and 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 get_geometry_name().
Referenced by blender::io::obj::CurveFromGeometry::create_curve_object(), blender::io::obj::MeshFromGeometry::create_mesh_object(), and get_geometry_name().
|
static |
Definition at line 139 of file obj_export_mtl.cc.
References blender::BKE_image_has_filepath(), blender::BKE_image_has_packedfile(), blender::BLI_path_basename(), blender::BLI_path_sequence_decode(), blender::BLI_path_sequence_encode(), CLOG_INFO, FILE_MAX, blender::gpu::shader::parser::filename(), get_image_filepath(), blender::bNode::id, blender::IMA_SRC_SEQUENCE, blender::LOG, blender::bNode::storage, and blender::STRNCPY().
Referenced by get_image_filepath(), and store_image_textures().
|
static |
From a list of sockets, get the parent node which is of the given node type.
Definition at line 124 of file obj_export_mtl.cc.
References get_node_of_type(), blender::bke::bNodeType::type_legacy, and blender::bNode::typeinfo.
Referenced by get_node_of_type(), and store_image_textures().
|
static |
Definition at line 377 of file obj_import_mesh.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::BKE_libblock_find_name(), blender::BKE_material_add(), blender::BKE_ntree_update_after_single_tree_change(), create_mtl_node_tree(), get_or_create_material(), blender::ID_MA, blender::id_us_min(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), and blender::OBJ_MTL_NAME_COLLISION_REFERENCE_EXISTING.
Referenced by get_or_create_material().
|
static |
Definition at line 356 of file obj_export_file_writer.cc.
References blender::OBJExportParams::export_smooth_groups, get_smooth_group(), NEGATIVE_INIT, SMOOTH_GROUP_DEFAULT, and SMOOTH_GROUP_DISABLED.
Referenced by get_smooth_group(), and blender::io::obj::OBJWriter::write_face_elements().
|
static |
Definition at line 70 of file obj_import_nurbs.cc.
References blender::element, and get_valid_nurbs_degree().
Referenced by get_valid_nurbs_degree().
| void blender::io::obj::importer_geometry | ( | const OBJImportParams & | import_params, |
| Vector< bke::GeometrySet > & | geometries ) |
Definition at line 209 of file obj_importer.cc.
References geometry_to_blender_geometry_set(), importer_geometry(), and blender::io::obj::OBJParser::parse().
Referenced by importer_geometry(), blender::OBJ_import_geometries(), and blender::io::obj::OBJCurvesTest::read_curves().
| void blender::io::obj::importer_main | ( | bContext * | C, |
| const OBJImportParams & | import_params ) |
Definition at line 222 of file obj_importer.cc.
References blender::BKE_layer_collection_get_active_editable(), blender::BKE_report(), blender::BKE_view_layer_base_deselect_all(), C, blender::OBJImportParams::clear_selection, blender::LayerCollection::collection, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::OBJImportParams::filepath, geometry_to_blender_objects(), ID_IS_EDITABLE, importer_main(), blender::io::obj::OBJParser::mtl_libraries(), blender::io::obj::OBJParser::parse(), blender::io::obj::MTLParser::parse_and_store(), blender::OBJImportParams::reports, and blender::RPT_WARNING.
Referenced by importer_main(), and blender::OBJ_import().
|
static |
Definition at line 96 of file obj_exporter.cc.
References blender::CU_BEZIER, is_curve_nurbs_compatible(), blender::Nurb::next, blender::Nurb::pntsv, and blender::Nurb::type.
Referenced by filter_supported_objects(), and is_curve_nurbs_compatible().
|
static |
Definition at line 727 of file obj_export_file_writer.cc.
References is_non_pbr_map(), Reflection, and SpecularExponent.
Referenced by is_non_pbr_map(), and blender::io::obj::MTLWriter::write_materials().
|
static |
Definition at line 721 of file obj_export_file_writer.cc.
References is_pbr_map(), Metallic, Roughness, and Sheen.
Referenced by is_pbr_map(), and blender::io::obj::MTLWriter::write_materials().
|
static |
Definition at line 157 of file obj_import_mtl.cc.
References blender::BLI_assert(), link_sockets(), blender::bke::node_add_link(), blender::bke::node_find_socket(), blender::SOCK_IN, blender::SOCK_OUT, and blender::UString::UString().
Referenced by add_image_textures(), create_mtl_node_tree(), and link_sockets().
|
static |
Collect all the source sockets linked to the destination socket in a destination node.
Definition at line 96 of file obj_export_mtl.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Span< T >::first(), blender::bNode::idname, linked_sockets_to_dest_id(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), STREQ, and blender::UString::UString().
Referenced by linked_sockets_to_dest_id(), and store_image_textures().
|
static |
Definition at line 72 of file obj_import_mtl.cc.
References blender::BKE_image_load_exists(), blender::BKE_main_blendfile_path(), blender::BLI_path_normalize(), blender::BLI_path_rel(), CLOG_INFO, CLOG_WARN, load_image_at_path(), and blender::LOG.
Referenced by load_image_at_path(), and load_texture_image().
|
static |
Definition at line 93 of file obj_import_mtl.cc.
References blender::BLI_path_basename(), create_placeholder_image(), ELEM, blender::io::obj::MTLTexMap::image_path, load_image_at_path(), load_texture_image(), and blender::io::obj::MTLTexMap::mtl_dir_path.
Referenced by add_image_textures(), and load_texture_image().
|
static |
Definition at line 722 of file obj_import_file_reader.cc.
References Alpha, Color, Count, Emission, Metallic, mtl_line_start_to_texture_type(), Normal, parse_keyword(), Reflection, Roughness, Sheen, Specular, and SpecularExponent.
Referenced by mtl_line_start_to_texture_type(), and parse_texture_map().
| MTLMaterial blender::io::obj::mtlmaterial_for_material | ( | const Material * | material | ) |
Definition at line 381 of file obj_export_mtl.cc.
References blender::BLI_assert(), find_bsdf_node(), mtlmaterial_for_material(), blender::io::obj::MTLMaterial::name, store_bsdf_properties(), and store_image_textures().
Referenced by blender::io::obj::MTLWriter::add_materials(), and mtlmaterial_for_material().
| void blender::io::obj::obj_parallel_chunked_output | ( | FormatHandler & | fh, |
| int | tot_count, | ||
| const Function & | function ) |
Definition at line 251 of file obj_export_file_writer.cc.
References blender::io::obj::FormatHandler::append_from(), calc_chunk_count(), chunk_size, blender::IndexRange::IndexRange(), obj_parallel_chunked_output(), and blender::threading::parallel_for().
Referenced by obj_parallel_chunked_output(), 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 279 of file obj_exporter.cc.
References blender::BKE_reportf(), BLI_assert_msg, blender::OBJExportParams::export_material_groups, blender::OBJExportParams::export_materials, open_stream_writers(), print_exception_error(), blender::OBJExportParams::reports, blender::RPT_ERROR, and blender::RPT_WARNING.
Referenced by export_objects(), and open_stream_writers().
|
static |
Definition at line 474 of file obj_import_file_reader.cc.
References blender::blender::StringRefBase::data(), parse_keyword(), and blender::blender::StringRefBase::size().
Referenced by mtl_line_start_to_texture_type(), blender::io::obj::MTLParser::parse_and_store(), parse_keyword(), and parse_texture_option().
|
static |
Definition at line 817 of file obj_import_file_reader.cc.
References CLOG_WARN, Count, blender::io::obj::MTLTexMap::image_path, blender::LOG, blender::io::obj::MTLTexMap::mtl_dir_path, mtl_line_start_to_texture_type(), parse_texture_map(), parse_texture_option(), blender::blender::StringRefBase::startswith(), blender::StringRef::StringRef(), and blender::io::obj::MTLMaterial::tex_map_of_type().
Referenced by blender::io::obj::MTLParser::parse_and_store(), and parse_texture_map().
|
static |
Definition at line 771 of file obj_import_file_reader.cc.
References CLOG_WARN, blender::io::drop_non_whitespace(), blender::io::drop_whitespace(), blender::LOG, blender::io::obj::MTLMaterial::normal_strength, blender::io::parse_float(), blender::io::parse_floats(), parse_keyword(), parse_texture_option(), blender::io::obj::MTLTexMap::projection_type, blender::io::obj::MTLTexMap::scale, blender::SHD_PROJ_SPHERE, blender::blender::StringRefBase::startswith(), blender::StringRef::StringRef(), blender::io::obj::MTLTexMap::translation, and unsupported_texture_options.
Referenced by parse_texture_map(), and parse_texture_option().
|
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 165 of file obj_import_file_reader.cc.
References CLOG_WARN, INT32_MAX, blender::LOG, blender::io::parse_int(), and parse_vertex_index().
Referenced by geom_add_polyline(), and parse_vertex_index().
|
static |
Definition at line 91 of file obj_exporter.cc.
References CLOG_ERROR, blender::LOG, and print_exception_error().
Referenced by open_stream_writers(), and print_exception_error().
|
static |
Definition at line 124 of file obj_exporter_tests.cc.
References blender::BLI_file_read_text_as_mem(), and read_temp_file_in_string().
Referenced by blender::io::obj::OBJExportRegressionTest::compare_obj_export_to_golden(), read_temp_file_in_string(), TEST_F(), and TEST_F().
|
static |
Get the number of control points repeated for a cyclic curve given the multiplicity found at the endpoints (assumes cyclic curve).
Definition at line 82 of file obj_import_nurbs.cc.
References blender::BLI_assert(), blender::bke::curves::nurbs::calculate_multiplicity_sequence(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), repeating_cyclic_point_num(), and blender::Span< T >::slice().
Referenced by detect_knot_mode_cyclic(), and repeating_cyclic_point_num().
Definition at line 314 of file obj_export_mesh.cc.
References round_float3_to_n_digits(), round_float_to_n_digits(), and blender::v.
Referenced by round_float3_to_n_digits(), and blender::io::obj::OBJMesh::store_normal_coords_and_indices().
Round f to round_digits decimal digits.
Definition at line 308 of file obj_export_mesh.cc.
References ceilf, powf, round_float_to_n_digits(), and scale().
Referenced by round_float3_to_n_digits(), and round_float_to_n_digits().
|
static |
Definition at line 169 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, 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, blender::io::obj::MTLMaterial::illum_mode, blender::io::obj::MTLMaterial::ior, blender::io::obj::MTLTexMap::is_valid(), blender::LOG, blender::MA_BL_HIDE_BACKFACE, blender::MA_BM_BLEND, blender::io::obj::MTLMaterial::metallic, blender::io::obj::MTLMaterial::roughness, set_bsdf_socket_values(), set_property_of_socket(), blender::io::obj::MTLMaterial::sheen, blender::SOCK_FLOAT, blender::SOCK_RGBA, blender::io::obj::MTLMaterial::spec_color, blender::io::obj::MTLMaterial::spec_exponent, blender::sqrt(), blender::io::obj::MTLMaterial::tex_map_of_type(), and blender::io::obj::MTLMaterial::transmit_color.
Referenced by create_mtl_node_tree(), and set_bsdf_socket_values().
|
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 38 of file obj_import_mtl.cc.
References blender::BLI_assert(), blender::copy_v3_v3(), blender::copy_v4_v4(), blender::Span< T >::data(), blender::bNodeSocket::default_value, blender::bke::node_find_socket(), set_property_of_socket(), blender::Span< T >::size(), blender::SOCK_FLOAT, blender::SOCK_IN, blender::SOCK_RGBA, blender::SOCK_VECTOR, blender::bNodeSocket::type, blender::UString::UString(), blender::bNodeSocketValueRGBA::value, and blender::bNodeSocketValueVector::value.
Referenced by add_image_textures(), set_bsdf_socket_values(), and set_property_of_socket().
|
static |
Definition at line 218 of file obj_export_file_writer.cc.
References spaces_to_underscores().
Referenced by spaces_to_underscores(), 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 198 of file obj_export_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, 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, blender::io::obj::MTLMaterial::illum_mode, blender::io::obj::MTLMaterial::ior, blender::io::obj::MTLMaterial::metallic, blender::mul_v3_fl(), blender::io::obj::MTLMaterial::roughness, blender::io::obj::MTLMaterial::sheen, sheen(), blender::SOCK_FLOAT, blender::SOCK_RGBA, blender::io::obj::MTLMaterial::spec_color, blender::io::obj::MTLMaterial::spec_exponent, store_bsdf_properties(), and blender::io::obj::MTLMaterial::transmit_color.
Referenced by mtlmaterial_for_material(), and store_bsdf_properties().
|
static |
Store image texture options and file-paths in r_mtl_mat.
Definition at line 310 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, blender::SOCK_FLOAT, blender::SOCK_VECTOR, store_image_textures(), tex_map_type_to_socket_id, blender::io::obj::MTLMaterial::texture_maps, and blender::io::obj::MTLTexMap::translation.
Referenced by mtlmaterial_for_material(), and store_image_textures().
|
static |
Definition at line 233 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 113 of file obj_exporter_tests.cc.
References append_frame_to_filename(), EXPECT_TRUE, FILE_MAX, SEP_STR, and TEST().
| blender::io::obj::TEST | ( | obj_exporter_utils | , |
| append_negative_frame_to_filename | ) |
Definition at line 91 of file obj_exporter_tests.cc.
References append_frame_to_filename(), EXPECT_TRUE, FILE_MAX, SEP_STR, and TEST().
| blender::io::obj::TEST | ( | obj_exporter_utils | , |
| append_positive_frame_to_filename | ) |
Definition at line 102 of file obj_exporter_tests.cc.
References append_frame_to_filename(), EXPECT_TRUE, FILE_MAX, SEP_STR, and TEST().
| blender::io::obj::TEST | ( | obj_exporter_writer | , |
| format_handler_buffer_chunking | ) |
Definition at line 207 of file obj_exporter_tests.cc.
References blender::io::obj::FormatHandler::get_as_string(), blender::io::obj::FormatHandler::get_block_count(), TEST(), 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_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_cyclic_deg4_discontinous_10 | ) |
Definition at line 412 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::NURBS_KNOT_MODE_CUSTOM, blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_cyclic_deg4_discontinous_11 | ) |
Definition at line 394 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::NURBS_KNOT_MODE_CUSTOM, blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_cyclic_deg4_discontinous_13 | ) |
Definition at line 376 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::NURBS_KNOT_MODE_CUSTOM, blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_cyclic_deg4_discontinous_9 | ) |
Definition at line 430 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::NURBS_KNOT_MODE_CUSTOM, blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_cyclic_deg4_looped_12 | ) |
Definition at line 354 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_cyclic_deg4_looped_8 | ) |
Definition at line 365 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_deg2 | ) |
Definition at line 292 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_deg4 | ) |
Definition at line 314 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_single_segment_deg2 | ) |
Definition at line 270 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_single_segment_deg4 | ) |
Definition at line 281 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_clamped_uneven_deg2 | ) |
Definition at line 303 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_cyclic_deg4_looped_12 | ) |
Definition at line 454 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::array_utils::copy(), blender::Span< T >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, blender::Span< T >::size(), blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_cyclic_deg4_looped_8 | ) |
Definition at line 551 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::array_utils::copy(), blender::Span< T >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, position_data, blender::result, blender::Span< T >::size(), blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_cyclic_deg4_looped_discontinous_10 | ) |
Definition at line 511 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::array_utils::copy(), blender::Span< T >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_CUSTOM, position_data, blender::result, blender::Span< T >::size(), blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_cyclic_deg4_looped_discontinous_11 | ) |
Definition at line 491 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::array_utils::copy(), blender::Span< T >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_CUSTOM, position_data, blender::result, blender::Span< T >::size(), blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_cyclic_deg4_looped_discontinous_13 | ) |
Definition at line 471 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::array_utils::copy(), blender::Span< T >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_CUSTOM, position_data, blender::result, blender::Span< T >::size(), blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_bezier_cyclic_deg4_looped_discontinous_9 | ) |
Definition at line 531 of file obj_nurbs_io_tests.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::array_utils::copy(), blender::Span< T >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_CUSTOM, position_data, blender::result, blender::Span< T >::size(), blender::Span< T >::slice(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_clamped_polyline | ) |
Definition at line 196 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_cyclic_clamped_deg4 | ) |
Definition at line 253 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_cyclic_deg4 | ) |
Definition at line 242 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_NORMAL, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_cyclic_polyline | ) |
Definition at line 229 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT, blender::NURBS_KNOT_MODE_NORMAL, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_deg5 | ) |
Definition at line 185 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_NORMAL, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_endpoint_clamped_deg3 | ) |
Definition at line 207 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_ENDPOINT, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_endpoint_clamped_deg5 | ) |
Definition at line 218 of file obj_nurbs_io_tests.cc.
References blender::NURBS_KNOT_MODE_NORMAL, position_data, blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJCurvesTest | , |
| nurbs_io_uniform_polyline | ) |
Definition at line 160 of file obj_nurbs_io_tests.cc.
References blender::bke::curves::nurbs::calculate_knots(), blender::bke::curves::nurbs::calculate_multiplicity_sequence(), blender::bke::curves::nurbs::knots_num(), blender::NURBS_KNOT_MODE_ENDPOINT, blender::NURBS_KNOT_MODE_NORMAL, position_data, blender::result, blender::Span< T >::size(), and TEST_F().
| blender::io::obj::TEST_F | ( | ObjExporterWriterTest | , |
| header | ) |
Definition at line 171 of file obj_exporter_tests.cc.
References blender::BKE_blender_version_string(), blender::BKE_tempdir_init(), read_temp_file_in_string(), blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | ObjExporterWriterTest | , |
| mtllib | ) |
Definition at line 190 of file obj_exporter_tests.cc.
References read_temp_file_in_string(), blender::result, and TEST_F().
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_curves | ) |
Definition at line 551 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_curves_as_nurbs | ) |
Definition at line 561 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_objects | ) |
Definition at line 572 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_objects_mat_groups | ) |
Definition at line 585 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_quads | ) |
Definition at line 339 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| all_tris | ) |
Definition at line 330 of file obj_exporter_tests.cc.
References blender::BLI_delete(), and save_failing_test_output.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_all_data_triangulated | ) |
Definition at line 449 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_loose_edges | ) |
Definition at line 387 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_normal_edit | ) |
Definition at line 462 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cube_vertex_groups | ) |
Definition at line 475 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_positioned | ) |
Definition at line 489 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_vertex_colors | ) |
Definition at line 501 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_with_textures_relative | ) |
Definition at line 526 of file obj_exporter_tests.cc.
References blender::PATH_REFERENCE_STRIP, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| cubes_with_textures_strip | ) |
Definition at line 515 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| edges | ) |
Definition at line 362 of file obj_exporter_tests.cc.
References blender::IO_AXIS_Z, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| fgons | ) |
Definition at line 350 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| materials_pbr | ) |
Definition at line 609 of file obj_exporter_tests.cc.
References blender::PATH_REFERENCE_RELATIVE, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| materials_without_pbr | ) |
Definition at line 598 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| non_uniform_scale | ) |
Definition at line 399 of file obj_exporter_tests.cc.
References blender::IO_AXIS_Z, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| nurbs_as_mesh | ) |
Definition at line 436 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| nurbs_as_nurbs | ) |
Definition at line 410 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| nurbs_curves_as_nurbs | ) |
Definition at line 423 of file obj_exporter_tests.cc.
References SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| suzanne_all_data | ) |
Definition at line 537 of file obj_exporter_tests.cc.
References blender::PATH_REFERENCE_RELATIVE, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportRegressionTest | , |
| vertices | ) |
Definition at line 374 of file obj_exporter_tests.cc.
References blender::IO_AXIS_Z, and SEP_STR.
| blender::io::obj::TEST_F | ( | OBJExportTest | , |
| filter_objects_curves_as_mesh | ) |
Definition at line 52 of file obj_exporter_tests.cc.
References all_objects_file, blender::EXPECT_EQ(), filter_supported_objects(), and TEST_F().
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJExportTest | , |
| filter_objects_curves_as_nurbs | ) |
Definition at line 64 of file obj_exporter_tests.cc.
References all_objects_file, blender::EXPECT_EQ(), blender::OBJExportParams::export_curves_as_nurbs, filter_supported_objects(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJExportTest | , |
| filter_objects_selected | ) |
Definition at line 77 of file obj_exporter_tests.cc.
References all_objects_file, blender::EXPECT_EQ(), blender::OBJExportParams::export_curves_as_nurbs, blender::OBJExportParams::export_selected_objects, filter_supported_objects(), and TEST_F().
| blender::io::obj::TEST_F | ( | OBJMTLParserTest | , |
| materials | ) |
Definition at line 138 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, blender::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, blender::SHD_PROJ_SPHERE, blender::io::obj::MTLMaterial::sheen, blender::io::obj::MTLMaterial::spec_color, blender::io::obj::MTLMaterial::spec_exponent, Specular, SpecularExponent, TEST_F(), 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 244 of file obj_mtl_parser_tests.cc.
References blender::io::obj::MTLMaterial::alpha, blender::io::obj::MTLMaterial::aniso, blender::io::obj::MTLMaterial::aniso_rot, blender::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, TEST_F(), and blender::io::obj::MTLMaterial::tex_map_of_type().
| blender::io::obj::TEST_F | ( | OBJMTLParserTest | , |
| string_newlines_whitespace | ) |
Definition at line 91 of file obj_mtl_parser_tests.cc.
References blender::io::obj::MTLMaterial::ambient_color, blender::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, TEST_F(), 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 blender::BKE_object_apply_mat4(), blender::copy_m4_m3(), blender::OBJImportParams::forward_axis, blender::OBJImportParams::global_scale, blender::IO_AXIS_Y, blender::IO_AXIS_Z, blender::mat3_from_axis_conversion(), blender::rescale_m4(), transform_object(), blender::unit_m3(), blender::unit_m4(), and blender::OBJImportParams::up_axis.
Referenced by blender::io::obj::CurveFromGeometry::create_curve_object(), blender::io::obj::MeshFromGeometry::create_mesh_object(), and transform_object().
|
static |
Definition at line 494 of file obj_import_file_reader.cc.
References GEOM_MESH, blender::io::obj::Geometry::geom_type_, blender::io::obj::Geometry::track_all_vertices(), use_all_vertices_if_no_faces(), and blender::io::obj::GlobalVertices::vertices.
Referenced by blender::io::obj::OBJParser::parse(), and use_all_vertices_if_no_faces().
| Span< float > blender::io::obj::valid_nurb_control_point_range | ( | int8_t | order, |
| Span< float > | knots, | ||
| IndexRange & | point_range ) |
Finds the range within the control points that represents the sequence of valid spans or 'segments'.
For example, if a NURBS curve of order 2 has following 5 knots: [0, 0, 0, 1, 1] associated to three control points. Valid control point range would be the interval [1, 2] and the knot sequence [0, 0, 1, 1] since the first knot/point does not contribute to any span/segment.
Definition at line 59 of file obj_export_nurbs.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::BLI_assert(), blender::bke::curves::nurbs::calculate_multiplicity_sequence(), blender::IndexRange::drop_back(), blender::Span< T >::drop_back(), blender::IndexRange::drop_front(), blender::Span< T >::drop_front(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), find_leftmost_span(), find_rightmost_span(), blender::bke::curves::nurbs::knots_num(), blender::IndexRange::size(), blender::Span< T >::size(), blender::Span< T >::slice(), and valid_nurb_control_point_range().
Referenced by valid_nurb_control_point_range(), and blender::io::obj::OBJWriter::write_nurbs_curve().
|
static |
Definition at line 311 of file obj_exporter.cc.
References blender::OBJExportParams::blen_filepath, blender::BLI_assert(), blender::BLI_path_normalize(), blender::BLI_path_slash_native(), blender::BLI_path_split_dir_part(), blender::OBJExportParams::export_pbr_extensions, blender::OBJExportParams::file_base_for_tests, FILE_MAX, blender::OBJExportParams::filepath, blender::OBJExportParams::path_mode, blender::STRNCPY(), blender::io::obj::MTLWriter::write_header(), blender::io::obj::MTLWriter::write_materials(), and write_materials().
Referenced by export_objects(), and write_materials().
|
static |
Definition at line 164 of file obj_exporter.cc.
References blender::io::obj::MTLWriter::add_materials(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), b, blender::OBJExportParams::export_colors, blender::OBJExportParams::export_materials, blender::OBJExportParams::export_normals, blender::OBJExportParams::export_smooth_groups, blender::OBJExportParams::export_uv, blender::io::obj::OBJWriter::get_outfile(), blender::IndexRange::IndexRange(), 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, blender::nullptr, blender::threading::parallel_for(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::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(), write_mesh_objects(), 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_objects(), and write_mesh_objects().
|
static |
Export NURBS Curves in parameter form, not as vertices and edges.
Definition at line 267 of file obj_exporter.cc.
References blender::io::obj::OBJWriter::get_outfile(), blender::io::obj::OBJWriter::write_nurbs_curve(), write_nurbs_curve_objects(), and blender::io::obj::FormatHandler::write_to_file().
Referenced by export_objects(), and write_nurbs_curve_objects().
| const std::string blender::io::obj::all_objects_file = "io_tests" SEP_STR "blend_scene" SEP_STR "all_objects.blend" |
Definition at line 50 of file obj_exporter_tests.cc.
|
static |
Definition at line 238 of file obj_export_file_writer.cc.
Referenced by calc_chunk_count(), and obj_parallel_chunked_output().
|
static |
Definition at line 53 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 62 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 141 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 139 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locx_mapping = -680.0f |
Definition at line 138 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locx_normalmap = -200.0f |
Definition at line 140 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locx_output = 280.0f |
Definition at line 142 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 137 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locy_step = 300.0f |
Definition at line 146 of file obj_import_mtl.cc.
Referenced by add_image_textures().
| const float blender::io::obj::node_locy_top = 300.0f |
Definition at line 145 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().
| const std::array<float3, 13> blender::io::obj::position_array |
Definition at line 141 of file obj_nurbs_io_tests.cc.
| const Span<float3> blender::io::obj::position_data = Span<float3>(position_array) |
Definition at line 154 of file obj_nurbs_io_tests.cc.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
constexpr |
Definition at line 31 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 51 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 50 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 31 of file obj_export_mtl.cc.
Referenced by add_image_textures(), BLI_STATIC_ASSERT(), and store_image_textures().
|
static |
Definition at line 562 of file obj_export_file_writer.cc.
Referenced by BLI_STATIC_ASSERT().
|
static |
Definition at line 759 of file obj_import_file_reader.cc.
Referenced by parse_texture_option().