diff options
author | Aras Pranckevicius <aras_p> | 2022-03-19 23:20:22 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2022-03-19 23:20:22 +0300 |
commit | 8aa365745a78c0a6778c871f865ab55df3e87e9d (patch) | |
tree | 2429057864fbcf540d2a9527d1a79986818e99e4 /source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc | |
parent | 873801d25e24141a1d513b4b75b123fb7e08b614 (diff) |
Fix T96430: new OBJ exporter wrong normals for non-uniform scale, and wrong face order for negative scale
This applies patch D14343 from Aras Pranckevicius, with a description:
The new 3.1+ OBJ exporter did not have correct logic when faced with
non-uniform & mirrored (negative on odd number of axes) object scale:
- Normals were not transformed correctly (should use inverse transpose of the matrix),
and were not normalized,
- Face order was not "flipped" when transform has negative scale on odd number of axes
(visible when using "face orientation" viewport overlay).
Diffstat (limited to 'source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc | 10 |
1 files changed, 10 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 cc1cca74a38..27f34ca6be9 100644 --- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc @@ -405,6 +405,16 @@ TEST_F(obj_exporter_regression_test, vertices) "io_tests/blend_geometry/vertices.blend", "io_tests/obj/vertices.obj", "", _export.params); } +TEST_F(obj_exporter_regression_test, non_uniform_scale) +{ + OBJExportParamsDefault _export; + _export.params.export_materials = false; + compare_obj_export_to_golden("io_tests/blend_geometry/non_uniform_scale.blend", + "io_tests/obj/non_uniform_scale.obj", + "", + _export.params); +} + TEST_F(obj_exporter_regression_test, nurbs_as_nurbs) { OBJExportParamsDefault _export; |