Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2022-01-06 19:22:49 +0300
committerMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2022-01-06 19:22:49 +0300
commitda8c799a7f2e8f618b472892c012d2eaf0a4dbf5 (patch)
treec4db29be146d2772dd4c53356ee81285a92caf8b /io_mesh_ply
parentd2de1bbd88d839d97917f142398daaa586d89b79 (diff)
PLY: do not write face normals to vertices
Spliting edges for this purpose is doing more harm than good, additionally not all DCCs import PLY normals anyway, including Blender.
Diffstat (limited to 'io_mesh_ply')
-rw-r--r--io_mesh_ply/export_ply.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 1a28f3cf..3bb21858 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -80,7 +80,7 @@ def save_mesh(filepath, bm, use_ascii, use_normals, use_uv, use_color):
use_uv = use_uv and uv_lay is not None
use_color = use_color and col_lay is not None
- uv = color = None
+ normal = uv = color = None
ply_faces = []
ply_verts = []
@@ -91,10 +91,6 @@ def save_mesh(filepath, bm, use_ascii, use_normals, use_uv, use_color):
pf = []
ply_faces.append(pf)
- normal = None
- if use_normals and not f.smooth:
- normal = f.normal
-
for loop in f.loops:
v = map_id = loop.vert
@@ -108,7 +104,7 @@ def save_mesh(filepath, bm, use_ascii, use_normals, use_uv, use_color):
pf.append(_id)
continue
- if use_normals and normal is None:
+ if use_normals:
normal = v.normal
if use_color:
color = tuple(int(x * 255.0) for x in loop[col_lay])