diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2022-01-18 07:22:40 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2022-01-18 07:22:40 +0300 |
commit | 6dd89afa966042f8ae402c848655ac0dc0d795fe (patch) | |
tree | 9c46d63d75f17bfa40a1622d6be2480a413eea22 /source/blender/io/wavefront_obj/exporter/obj_export_io.hh | |
parent | db496a0b7dcf1ab024aece9858257c40529138e4 (diff) |
Fix obj exporter tests by deduping normals and printing with less precision.
Some new obj exporter tests were disabled because the normals were different
in the last decimal place on different platforms.
The old python exporter deduped normals with their coordinates rounded to
four decimal places. This change does the same in the new exporter.
On one test, this produced a file 25% smaller and even ran 10% faster.
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter/obj_export_io.hh')
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_io.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh index 6d0ff1aa6a5..a6f0174d68b 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh @@ -130,7 +130,7 @@ syntax_elem_to_formatting(const eOBJSyntaxElement key) return {"vt %f %f\n", 2, is_type_float<T...>}; } case eOBJSyntaxElement::normal: { - return {"vn %f %f %f\n", 3, is_type_float<T...>}; + return {"vn %.4f %.4f %.4f\n", 3, is_type_float<T...>}; } case eOBJSyntaxElement::poly_element_begin: { return {"f", 0, is_type_string_related<T...>}; |