[Bf-extensions-cvs] [9fccb98] blender-v2.77-release: Avoid writing redundant zeros
Campbell Barton
noreply at git.blender.org
Tue Apr 5 10:54:46 CEST 2016
Commit: 9fccb9806a8fc2cf6b13668ca604ce778a7f6e4c
Author: Campbell Barton
Date: Tue Apr 5 18:02:48 2016 +1000
Branches: blender-v2.77-release
https://developer.blender.org/rBA9fccb9806a8fc2cf6b13668ca604ce778a7f6e4c
Avoid writing redundant zeros
These values are always rounded to 4 decimal places so no need to write 6.
===================================================================
M io_scene_obj/export_obj.py
===================================================================
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index 26ca8a0..9418cc6 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -522,7 +522,7 @@ def write_file(filepath, objects, scene,
uv_val = uv_get(uv_key)
if uv_val is None:
uv_val = uv_dict[uv_key] = uv_unique_count
- fw('vt %.6f %.6f\n' % uv[:])
+ fw('vt %.4f %.4f\n' % uv[:])
uv_unique_count += 1
uv_ls.append(uv_val)
@@ -543,7 +543,7 @@ def write_file(filepath, objects, scene,
no_val = no_get(no_key)
if no_val is None:
no_val = normals_to_idx[no_key] = no_unique_count
- fw('vn %.6f %.6f %.6f\n' % no_key)
+ fw('vn %.4f %.4f %.4f\n' % no_key)
no_unique_count += 1
loops_to_normals[l_idx] = no_val
del normals_to_idx, no_get, no_key, no_val
More information about the Bf-extensions-cvs
mailing list