diff options
author | Aras Pranckevicius <aras_p> | 2022-03-20 00:13:21 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2022-03-20 00:14:53 +0300 |
commit | 5bfdaaa80082be12af9850a2af294823005abb72 (patch) | |
tree | 697acfda232c824493370d854b2b8879afc8fb9f /source/blender/io/wavefront_obj/tests | |
parent | eccb0b222e3465baa71430223c5ee2f0206a7b02 (diff) |
Fix T96415: new OBJ exporter was applying scaling factor incorrectly
This is patch D14347 from Aras Pranckevicius.
Instead of scaling "the scene" (i.e. transform vertices by object matrix,
then multiply by scale factor), it was instead first applying the scale
factor in local space, and then transforming by the object matrix.
Diffstat (limited to 'source/blender/io/wavefront_obj/tests')
-rw-r--r-- | source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc index 27f34ca6be9..e96a7d28561 100644 --- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc @@ -475,6 +475,17 @@ TEST_F(obj_exporter_regression_test, cube_normal_edit) _export.params); } +TEST_F(obj_exporter_regression_test, cubes_positioned) +{ + OBJExportParamsDefault _export; + _export.params.export_materials = false; + _export.params.scaling_factor = 2.0f; + compare_obj_export_to_golden("io_tests/blend_geometry/cubes_positioned.blend", + "io_tests/obj/cubes_positioned.obj", + "", + _export.params); +} + TEST_F(obj_exporter_regression_test, suzanne_all_data) { OBJExportParamsDefault _export; |