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:
authorDalai Felinto <dfelinto@gmail.com>2012-04-10 18:12:44 +0400
committerDalai Felinto <dfelinto@gmail.com>2012-04-10 18:12:44 +0400
commit5c87241390f3b52571bf86c284a0a04aed67a7cb (patch)
treeb0f7a27538e8ba88b9ef2c80d7b1895cacf0cab2 /io_mesh_ply
parent56a863947d9de1bed73288b0f98ef46c2321f18a (diff)
own patch [#30877] ply exporter to use shared faces when not exporting the normals
Faces should be exported with shared vertices whenever possible (otherwise this is simply a STL exporter). Since PLY stores normals per vertex it's understandable that we need 'individual' faces when exporting normals. However when this is not the case I think shared vertices should be default behaviour. This is what this patch implement. Thanks Campbell for reviewing it. Thanks Aldo Zang for reporting it (off trackers, in the old fashion real life)
Diffstat (limited to 'io_mesh_ply')
-rw-r--r--io_mesh_ply/__init__.py4
-rw-r--r--io_mesh_ply/export_ply.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index 851a6b7b..b940e934 100644
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@ -96,7 +96,7 @@ class ExportPLY(bpy.types.Operator, ExportHelper):
)
use_normals = BoolProperty(
name="Normals",
- description="Export Normals for smooth and hard shaded faces",
+ description="Export Normals for smooth and hard shaded faces. Hard shaded faces will be exported as individual faces",
default=True,
)
use_uv_coords = BoolProperty(
@@ -106,7 +106,7 @@ class ExportPLY(bpy.types.Operator, ExportHelper):
)
use_colors = BoolProperty(
name="Vertex Colors",
- description="Exort the active vertex color layer",
+ description="Export the active vertex color layer",
default=True)
@classmethod
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 995bd0f5..cb981a13 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -106,7 +106,7 @@ def save(operator,
vert_count = 0
for i, f in enumerate(mesh.tessfaces):
- smooth = f.use_smooth
+ smooth = not use_normals or f.use_smooth
if not smooth:
normal = tuple(f.normal)
normal_key = rvec3d(normal)