main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
3 changed files with 97 additions and 74 deletions
Showing only changes of commit 4fb2c9a407 - Show all commits

View File

@ -48,9 +48,9 @@ static int last_studiolight_id = 0;
*/ */
#define STUDIOLIGHT_LOAD_CACHED_FILES #define STUDIOLIGHT_LOAD_CACHED_FILES
static const char *STUDIOLIGHT_LIGHTS_FOLDER = "studiolights/studio/"; static const char *STUDIOLIGHT_LIGHTS_FOLDER = "studiolights" SEP_STR "studio" SEP_STR;
static const char *STUDIOLIGHT_WORLD_FOLDER = "studiolights/world/"; static const char *STUDIOLIGHT_WORLD_FOLDER = "studiolights" SEP_STR "world" SEP_STR;
static const char *STUDIOLIGHT_MATCAP_FOLDER = "studiolights/matcap/"; static const char *STUDIOLIGHT_MATCAP_FOLDER = "studiolights" SEP_STR "matcap" SEP_STR;
static const char *STUDIOLIGHT_WORLD_DEFAULT = "forest.exr"; static const char *STUDIOLIGHT_WORLD_DEFAULT = "forest.exr";
static const char *STUDIOLIGHT_MATCAP_DEFAULT = "basic_1.exr"; static const char *STUDIOLIGHT_MATCAP_DEFAULT = "basic_1.exr";

View File

@ -50,7 +50,7 @@ class PlyExportTest : public BlendfileLoadingBaseTest {
std::string get_temp_ply_filename(const std::string &filename) std::string get_temp_ply_filename(const std::string &filename)
{ {
return std::string(BKE_tempdir_session()) + "/" + filename; return std::string(BKE_tempdir_session()) + SEP_STR + filename;
} }
}; };
@ -451,24 +451,24 @@ class ply_exporter_ply_data_test : public PlyExportTest {
TEST_F(ply_exporter_ply_data_test, CubeLoadPLYDataVertices) TEST_F(ply_exporter_ply_data_test, CubeLoadPLYDataVertices)
{ {
PLYExportParams params = {}; PLYExportParams params = {};
PlyData plyData = load_ply_data_from_blendfile("io_tests/blend_geometry/cube_all_data.blend", PlyData plyData = load_ply_data_from_blendfile(
params); "io_tests" SEP_STR "blend_geometry" SEP_STR "cube_all_data.blend", params);
EXPECT_EQ(plyData.vertices.size(), 8); EXPECT_EQ(plyData.vertices.size(), 8);
} }
TEST_F(ply_exporter_ply_data_test, CubeLoadPLYDataUV) TEST_F(ply_exporter_ply_data_test, CubeLoadPLYDataUV)
{ {
PLYExportParams params = {}; PLYExportParams params = {};
params.export_uv = true; params.export_uv = true;
PlyData plyData = load_ply_data_from_blendfile("io_tests/blend_geometry/cube_all_data.blend", PlyData plyData = load_ply_data_from_blendfile(
params); "io_tests" SEP_STR "blend_geometry" SEP_STR "cube_all_data.blend", params);
EXPECT_EQ(plyData.uv_coordinates.size(), 8); EXPECT_EQ(plyData.uv_coordinates.size(), 8);
} }
TEST_F(ply_exporter_ply_data_test, SuzanneLoadPLYDataUV) TEST_F(ply_exporter_ply_data_test, SuzanneLoadPLYDataUV)
{ {
PLYExportParams params = {}; PLYExportParams params = {};
params.export_uv = true; params.export_uv = true;
PlyData plyData = load_ply_data_from_blendfile("io_tests/blend_geometry/suzanne_all_data.blend", PlyData plyData = load_ply_data_from_blendfile(
params); "io_tests" SEP_STR "blend_geometry" SEP_STR "suzanne_all_data.blend", params);
EXPECT_EQ(plyData.uv_coordinates.size(), 542); EXPECT_EQ(plyData.uv_coordinates.size(), 542);
} }
@ -476,8 +476,8 @@ TEST_F(ply_exporter_ply_data_test, CubeLoadPLYDataUVDisabled)
{ {
PLYExportParams params = {}; PLYExportParams params = {};
params.export_uv = false; params.export_uv = false;
PlyData plyData = load_ply_data_from_blendfile("io_tests/blend_geometry/cube_all_data.blend", PlyData plyData = load_ply_data_from_blendfile(
params); "io_tests" SEP_STR "blend_geometry" SEP_STR "cube_all_data.blend", params);
EXPECT_EQ(plyData.uv_coordinates.size(), 0); EXPECT_EQ(plyData.uv_coordinates.size(), 0);
} }

View File

@ -50,7 +50,7 @@ class obj_exporter_test : public BlendfileLoadingBaseTest {
} }
}; };
const std::string all_objects_file = "io_tests/blend_scene/all_objects.blend"; const std::string all_objects_file = "io_tests" SEP_STR "blend_scene" SEP_STR "all_objects.blend";
TEST_F(obj_exporter_test, filter_objects_curves_as_mesh) TEST_F(obj_exporter_test, filter_objects_curves_as_mesh)
{ {
@ -93,8 +93,8 @@ TEST_F(obj_exporter_test, filter_objects_selected)
TEST(obj_exporter_utils, append_negative_frame_to_filename) TEST(obj_exporter_utils, append_negative_frame_to_filename)
{ {
const char path_original[FILE_MAX] = "/my_file.obj"; const char path_original[FILE_MAX] = SEP_STR "my_file.obj";
const char path_truth[FILE_MAX] = "/my_file-123.obj"; const char path_truth[FILE_MAX] = SEP_STR "my_file-123.obj";
const int frame = -123; const int frame = -123;
char path_with_frame[FILE_MAX] = {0}; char path_with_frame[FILE_MAX] = {0};
const bool ok = append_frame_to_filename(path_original, frame, path_with_frame); const bool ok = append_frame_to_filename(path_original, frame, path_with_frame);
@ -104,8 +104,8 @@ TEST(obj_exporter_utils, append_negative_frame_to_filename)
TEST(obj_exporter_utils, append_positive_frame_to_filename) TEST(obj_exporter_utils, append_positive_frame_to_filename)
{ {
const char path_original[FILE_MAX] = "/my_file.obj"; const char path_original[FILE_MAX] = SEP_STR "my_file.obj";
const char path_truth[FILE_MAX] = "/my_file123.obj"; const char path_truth[FILE_MAX] = SEP_STR "my_file123.obj";
const int frame = 123; const int frame = 123;
char path_with_frame[FILE_MAX] = {0}; char path_with_frame[FILE_MAX] = {0};
const bool ok = append_frame_to_filename(path_original, frame, path_with_frame); const bool ok = append_frame_to_filename(path_original, frame, path_with_frame);
@ -148,7 +148,7 @@ TEST(obj_exporter_writer, header)
{ {
/* Because testing doesn't fully initialize Blender, we need the following. */ /* Because testing doesn't fully initialize Blender, we need the following. */
BKE_tempdir_init(nullptr); BKE_tempdir_init(nullptr);
std::string out_file_path = blender::tests::flags_test_release_dir() + "/" + temp_file_path; std::string out_file_path = blender::tests::flags_test_release_dir() + SEP_STR + temp_file_path;
{ {
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
std::unique_ptr<OBJWriter> writer = init_writer(_export.params, out_file_path); std::unique_ptr<OBJWriter> writer = init_writer(_export.params, out_file_path);
@ -166,7 +166,7 @@ TEST(obj_exporter_writer, header)
TEST(obj_exporter_writer, mtllib) TEST(obj_exporter_writer, mtllib)
{ {
std::string out_file_path = blender::tests::flags_test_release_dir() + "/" + temp_file_path; std::string out_file_path = blender::tests::flags_test_release_dir() + SEP_STR + temp_file_path;
{ {
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
std::unique_ptr<OBJWriter> writer = init_writer(_export.params, out_file_path); std::unique_ptr<OBJWriter> writer = init_writer(_export.params, out_file_path);
@ -263,7 +263,7 @@ class obj_exporter_regression_test : public obj_exporter_test {
std::string out_file_path = tempdir + BLI_path_basename(golden_obj.c_str()); std::string out_file_path = tempdir + BLI_path_basename(golden_obj.c_str());
strncpy(params.filepath, out_file_path.c_str(), FILE_MAX - 1); strncpy(params.filepath, out_file_path.c_str(), FILE_MAX - 1);
params.blen_filepath = bfile->main->filepath; params.blen_filepath = bfile->main->filepath;
std::string golden_file_path = blender::tests::flags_test_asset_dir() + "/" + golden_obj; std::string golden_file_path = blender::tests::flags_test_asset_dir() + SEP_STR + golden_obj;
BLI_split_dir_part(golden_file_path.c_str(), params.file_base_for_tests, PATH_MAX); BLI_split_dir_part(golden_file_path.c_str(), params.file_base_for_tests, PATH_MAX);
export_frame(depsgraph, params, out_file_path.c_str()); export_frame(depsgraph, params, out_file_path.c_str());
std::string output_str = read_temp_file_in_string(out_file_path); std::string output_str = read_temp_file_in_string(out_file_path);
@ -280,7 +280,8 @@ class obj_exporter_regression_test : public obj_exporter_test {
if (!golden_mtl.empty()) { if (!golden_mtl.empty()) {
std::string out_mtl_file_path = tempdir + BLI_path_basename(golden_mtl.c_str()); std::string out_mtl_file_path = tempdir + BLI_path_basename(golden_mtl.c_str());
std::string output_mtl_str = read_temp_file_in_string(out_mtl_file_path); std::string output_mtl_str = read_temp_file_in_string(out_mtl_file_path);
std::string golden_mtl_file_path = blender::tests::flags_test_asset_dir() + "/" + golden_mtl; std::string golden_mtl_file_path = blender::tests::flags_test_asset_dir() + SEP_STR +
golden_mtl;
std::string golden_mtl_str = read_temp_file_in_string(golden_mtl_file_path); std::string golden_mtl_str = read_temp_file_in_string(golden_mtl_file_path);
are_equal = strings_equal_after_first_lines(output_mtl_str, golden_mtl_str); are_equal = strings_equal_after_first_lines(output_mtl_str, golden_mtl_str);
if (save_failing_test_output && !are_equal) { if (save_failing_test_output && !are_equal) {
@ -297,9 +298,9 @@ class obj_exporter_regression_test : public obj_exporter_test {
TEST_F(obj_exporter_regression_test, all_tris) TEST_F(obj_exporter_regression_test, all_tris)
{ {
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
compare_obj_export_to_golden("io_tests/blend_geometry/all_tris.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "all_tris.blend",
"io_tests/obj/all_tris.obj", "io_tests" SEP_STR "obj" SEP_STR "all_tris.obj",
"io_tests/obj/all_tris.mtl", "io_tests" SEP_STR "obj" SEP_STR "all_tris.mtl",
_export.params); _export.params);
} }
@ -308,8 +309,10 @@ TEST_F(obj_exporter_regression_test, all_quads)
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.global_scale = 2.0f; _export.params.global_scale = 2.0f;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden( compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "all_quads.blend",
"io_tests/blend_geometry/all_quads.blend", "io_tests/obj/all_quads.obj", "", _export.params); "io_tests" SEP_STR "obj" SEP_STR "all_quads.obj",
"",
_export.params);
} }
TEST_F(obj_exporter_regression_test, fgons) TEST_F(obj_exporter_regression_test, fgons)
@ -318,8 +321,10 @@ TEST_F(obj_exporter_regression_test, fgons)
_export.params.forward_axis = IO_AXIS_Y; _export.params.forward_axis = IO_AXIS_Y;
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden( compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "fgons.blend",
"io_tests/blend_geometry/fgons.blend", "io_tests/obj/fgons.obj", "", _export.params); "io_tests" SEP_STR "obj" SEP_STR "fgons.obj",
"",
_export.params);
} }
TEST_F(obj_exporter_regression_test, edges) TEST_F(obj_exporter_regression_test, edges)
@ -328,8 +333,10 @@ TEST_F(obj_exporter_regression_test, edges)
_export.params.forward_axis = IO_AXIS_Y; _export.params.forward_axis = IO_AXIS_Y;
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden( compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "edges.blend",
"io_tests/blend_geometry/edges.blend", "io_tests/obj/edges.obj", "", _export.params); "io_tests" SEP_STR "obj" SEP_STR "edges.obj",
"",
_export.params);
} }
TEST_F(obj_exporter_regression_test, vertices) TEST_F(obj_exporter_regression_test, vertices)
@ -338,16 +345,19 @@ TEST_F(obj_exporter_regression_test, vertices)
_export.params.forward_axis = IO_AXIS_Y; _export.params.forward_axis = IO_AXIS_Y;
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden( compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "vertices.blend",
"io_tests/blend_geometry/vertices.blend", "io_tests/obj/vertices.obj", "", _export.params); "io_tests" SEP_STR "obj" SEP_STR "vertices.obj",
"",
_export.params);
} }
TEST_F(obj_exporter_regression_test, non_uniform_scale) TEST_F(obj_exporter_regression_test, non_uniform_scale)
{ {
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden("io_tests/blend_geometry/non_uniform_scale.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/non_uniform_scale.obj", "non_uniform_scale.blend",
"io_tests" SEP_STR "obj" SEP_STR "non_uniform_scale.obj",
"", "",
_export.params); _export.params);
} }
@ -359,8 +369,10 @@ TEST_F(obj_exporter_regression_test, nurbs_as_nurbs)
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
_export.params.export_curves_as_nurbs = true; _export.params.export_curves_as_nurbs = true;
compare_obj_export_to_golden( compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "nurbs.blend",
"io_tests/blend_geometry/nurbs.blend", "io_tests/obj/nurbs.obj", "", _export.params); "io_tests" SEP_STR "obj" SEP_STR "nurbs.obj",
"",
_export.params);
} }
TEST_F(obj_exporter_regression_test, nurbs_curves_as_nurbs) TEST_F(obj_exporter_regression_test, nurbs_curves_as_nurbs)
@ -370,8 +382,8 @@ TEST_F(obj_exporter_regression_test, nurbs_curves_as_nurbs)
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
_export.params.export_curves_as_nurbs = true; _export.params.export_curves_as_nurbs = true;
compare_obj_export_to_golden("io_tests/blend_geometry/nurbs_curves.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "nurbs_curves.blend",
"io_tests/obj/nurbs_curves.obj", "io_tests" SEP_STR "obj" SEP_STR "nurbs_curves.obj",
"", "",
_export.params); _export.params);
} }
@ -383,8 +395,10 @@ TEST_F(obj_exporter_regression_test, nurbs_as_mesh)
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
_export.params.export_curves_as_nurbs = false; _export.params.export_curves_as_nurbs = false;
compare_obj_export_to_golden( compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "nurbs.blend",
"io_tests/blend_geometry/nurbs.blend", "io_tests/obj/nurbs_mesh.obj", "", _export.params); "io_tests" SEP_STR "obj" SEP_STR "nurbs_mesh.obj",
"",
_export.params);
} }
TEST_F(obj_exporter_regression_test, cube_all_data_triangulated) TEST_F(obj_exporter_regression_test, cube_all_data_triangulated)
@ -394,8 +408,8 @@ TEST_F(obj_exporter_regression_test, cube_all_data_triangulated)
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
_export.params.export_triangulated_mesh = true; _export.params.export_triangulated_mesh = true;
compare_obj_export_to_golden("io_tests/blend_geometry/cube_all_data.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "cube_all_data.blend",
"io_tests/obj/cube_all_data_triangulated.obj", "io_tests" SEP_STR "obj" SEP_STR "cube_all_data_triangulated.obj",
"", "",
_export.params); _export.params);
} }
@ -406,8 +420,9 @@ TEST_F(obj_exporter_regression_test, cube_normal_edit)
_export.params.forward_axis = IO_AXIS_Y; _export.params.forward_axis = IO_AXIS_Y;
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden("io_tests/blend_geometry/cube_normal_edit.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/cube_normal_edit.obj", "cube_normal_edit.blend",
"io_tests" SEP_STR "obj" SEP_STR "cube_normal_edit.obj",
"", "",
_export.params); _export.params);
} }
@ -419,8 +434,9 @@ TEST_F(obj_exporter_regression_test, cube_vertex_groups)
_export.params.export_normals = false; _export.params.export_normals = false;
_export.params.export_uv = false; _export.params.export_uv = false;
_export.params.export_vertex_groups = true; _export.params.export_vertex_groups = true;
compare_obj_export_to_golden("io_tests/blend_geometry/cube_vertex_groups.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/cube_vertex_groups.obj", "cube_vertex_groups.blend",
"io_tests" SEP_STR "obj" SEP_STR "cube_vertex_groups.obj",
"", "",
_export.params); _export.params);
} }
@ -430,8 +446,9 @@ TEST_F(obj_exporter_regression_test, cubes_positioned)
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.export_materials = false; _export.params.export_materials = false;
_export.params.global_scale = 2.0f; _export.params.global_scale = 2.0f;
compare_obj_export_to_golden("io_tests/blend_geometry/cubes_positioned.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/cubes_positioned.obj", "cubes_positioned.blend",
"io_tests" SEP_STR "obj" SEP_STR "cubes_positioned.obj",
"", "",
_export.params); _export.params);
} }
@ -443,8 +460,9 @@ TEST_F(obj_exporter_regression_test, cubes_vertex_colors)
_export.params.export_normals = false; _export.params.export_normals = false;
_export.params.export_uv = false; _export.params.export_uv = false;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden("io_tests/blend_geometry/cubes_vertex_colors.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/cubes_vertex_colors.obj", "cubes_vertex_colors.blend",
"io_tests" SEP_STR "obj" SEP_STR "cubes_vertex_colors.obj",
"", "",
_export.params); _export.params);
} }
@ -453,9 +471,10 @@ TEST_F(obj_exporter_regression_test, cubes_with_textures_strip)
{ {
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.path_mode = PATH_REFERENCE_STRIP; _export.params.path_mode = PATH_REFERENCE_STRIP;
compare_obj_export_to_golden("io_tests/blend_geometry/cubes_with_textures.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/cubes_with_textures.obj", "cubes_with_textures.blend",
"io_tests/obj/cubes_with_textures.mtl", "io_tests" SEP_STR "obj" SEP_STR "cubes_with_textures.obj",
"io_tests" SEP_STR "obj" SEP_STR "cubes_with_textures.mtl",
_export.params); _export.params);
} }
@ -463,9 +482,10 @@ TEST_F(obj_exporter_regression_test, cubes_with_textures_relative)
{ {
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.path_mode = PATH_REFERENCE_RELATIVE; _export.params.path_mode = PATH_REFERENCE_RELATIVE;
compare_obj_export_to_golden("io_tests/blend_geometry/cubes_with_textures.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/cubes_with_textures_rel.obj", "cubes_with_textures.blend",
"io_tests/obj/cubes_with_textures_rel.mtl", "io_tests" SEP_STR "obj" SEP_STR "cubes_with_textures_rel.obj",
"io_tests" SEP_STR "obj" SEP_STR "cubes_with_textures_rel.mtl",
_export.params); _export.params);
} }
@ -476,8 +496,9 @@ TEST_F(obj_exporter_regression_test, suzanne_all_data)
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_materials = false; _export.params.export_materials = false;
_export.params.export_smooth_groups = true; _export.params.export_smooth_groups = true;
compare_obj_export_to_golden("io_tests/blend_geometry/suzanne_all_data.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR
"io_tests/obj/suzanne_all_data.obj", "suzanne_all_data.blend",
"io_tests" SEP_STR "obj" SEP_STR "suzanne_all_data.obj",
"", "",
_export.params); _export.params);
} }
@ -486,8 +507,10 @@ TEST_F(obj_exporter_regression_test, all_curves)
{ {
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.export_materials = false; _export.params.export_materials = false;
compare_obj_export_to_golden( compare_obj_export_to_golden("io_tests" SEP_STR "blend_scene" SEP_STR "all_curves.blend",
"io_tests/blend_scene/all_curves.blend", "io_tests/obj/all_curves.obj", "", _export.params); "io_tests" SEP_STR "obj" SEP_STR "all_curves.obj",
"",
_export.params);
} }
TEST_F(obj_exporter_regression_test, all_curves_as_nurbs) TEST_F(obj_exporter_regression_test, all_curves_as_nurbs)
@ -495,8 +518,8 @@ TEST_F(obj_exporter_regression_test, all_curves_as_nurbs)
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.export_materials = false; _export.params.export_materials = false;
_export.params.export_curves_as_nurbs = true; _export.params.export_curves_as_nurbs = true;
compare_obj_export_to_golden("io_tests/blend_scene/all_curves.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_scene" SEP_STR "all_curves.blend",
"io_tests/obj/all_curves_as_nurbs.obj", "io_tests" SEP_STR "obj" SEP_STR "all_curves_as_nurbs.obj",
"", "",
_export.params); _export.params);
} }
@ -508,9 +531,9 @@ TEST_F(obj_exporter_regression_test, all_objects)
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_smooth_groups = true; _export.params.export_smooth_groups = true;
_export.params.export_colors = true; _export.params.export_colors = true;
compare_obj_export_to_golden("io_tests/blend_scene/all_objects.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_scene" SEP_STR "all_objects.blend",
"io_tests/obj/all_objects.obj", "io_tests" SEP_STR "obj" SEP_STR "all_objects.obj",
"io_tests/obj/all_objects.mtl", "io_tests" SEP_STR "obj" SEP_STR "all_objects.mtl",
_export.params); _export.params);
} }
@ -521,9 +544,9 @@ TEST_F(obj_exporter_regression_test, all_objects_mat_groups)
_export.params.up_axis = IO_AXIS_Z; _export.params.up_axis = IO_AXIS_Z;
_export.params.export_smooth_groups = true; _export.params.export_smooth_groups = true;
_export.params.export_material_groups = true; _export.params.export_material_groups = true;
compare_obj_export_to_golden("io_tests/blend_scene/all_objects.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_scene" SEP_STR "all_objects.blend",
"io_tests/obj/all_objects_mat_groups.obj", "io_tests" SEP_STR "obj" SEP_STR "all_objects_mat_groups.obj",
"io_tests/obj/all_objects_mat_groups.mtl", "io_tests" SEP_STR "obj" SEP_STR "all_objects_mat_groups.mtl",
_export.params); _export.params);
} }
@ -532,9 +555,9 @@ TEST_F(obj_exporter_regression_test, materials_without_pbr)
OBJExportParamsDefault _export; OBJExportParamsDefault _export;
_export.params.export_normals = false; _export.params.export_normals = false;
_export.params.path_mode = PATH_REFERENCE_RELATIVE; _export.params.path_mode = PATH_REFERENCE_RELATIVE;
compare_obj_export_to_golden("io_tests/blend_geometry/materials_pbr.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "materials_pbr.blend",
"io_tests/obj/materials_without_pbr.obj", "io_tests" SEP_STR "obj" SEP_STR "materials_without_pbr.obj",
"io_tests/obj/materials_without_pbr.mtl", "io_tests" SEP_STR "obj" SEP_STR "materials_without_pbr.mtl",
_export.params); _export.params);
} }
@ -544,9 +567,9 @@ TEST_F(obj_exporter_regression_test, materials_pbr)
_export.params.export_normals = false; _export.params.export_normals = false;
_export.params.path_mode = PATH_REFERENCE_RELATIVE; _export.params.path_mode = PATH_REFERENCE_RELATIVE;
_export.params.export_pbr_extensions = true; _export.params.export_pbr_extensions = true;
compare_obj_export_to_golden("io_tests/blend_geometry/materials_pbr.blend", compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "materials_pbr.blend",
"io_tests/obj/materials_pbr.obj", "io_tests" SEP_STR "obj" SEP_STR "materials_pbr.obj",
"io_tests/obj/materials_pbr.mtl", "io_tests" SEP_STR "obj" SEP_STR "materials_pbr.mtl",
_export.params); _export.params);
} }