Skip to content
Snippets Groups Projects
Commit 9fccb980 authored by Campbell Barton's avatar Campbell Barton Committed by Sergey Sharybin
Browse files

Avoid writing redundant zeros

These values are always rounded to 4 decimal places so no need to write 6.
parent 4fdf6dcb
No related branches found
Tags v2.77a
No related merge requests found
...@@ -522,7 +522,7 @@ def write_file(filepath, objects, scene, ...@@ -522,7 +522,7 @@ def write_file(filepath, objects, scene,
uv_val = uv_get(uv_key) uv_val = uv_get(uv_key)
if uv_val is None: if uv_val is None:
uv_val = uv_dict[uv_key] = uv_unique_count 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_unique_count += 1
uv_ls.append(uv_val) uv_ls.append(uv_val)
...@@ -543,7 +543,7 @@ def write_file(filepath, objects, scene, ...@@ -543,7 +543,7 @@ def write_file(filepath, objects, scene,
no_val = no_get(no_key) no_val = no_get(no_key)
if no_val is None: if no_val is None:
no_val = normals_to_idx[no_key] = no_unique_count 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 no_unique_count += 1
loops_to_normals[l_idx] = no_val loops_to_normals[l_idx] = no_val
del normals_to_idx, no_get, no_key, no_val del normals_to_idx, no_get, no_key, no_val
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment