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:
authorChris Foster <cdbfoster@gmail.com>2013-05-14 02:39:33 +0400
committerChris Foster <cdbfoster@gmail.com>2013-05-14 02:39:33 +0400
commit8349a25a664cde63260fc999c8568979769c6947 (patch)
tree78ca31e58b9024128a9e9d7d04aaf7ffe4f7a2f7 /io_scene_x
parentaf722ce4427d8bbf5855aeffc30716536b409fe1 (diff)
Fixed face definition separator in mesh and normal face definitions.
Diffstat (limited to 'io_scene_x')
-rw-r--r--io_scene_x/export_x.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/io_scene_x/export_x.py b/io_scene_x/export_x.py
index 6be8a6bf..f8ccdef2 100644
--- a/io_scene_x/export_x.py
+++ b/io_scene_x/export_x.py
@@ -471,9 +471,15 @@ class MeshExportObject(ExportObject):
PolygonVertexIndexes = PolygonVertexIndexes[::-1]
- for VertexIndex in PolygonVertexIndexes:
- self.Exporter.File.Write("{},".format(VertexIndex),
- Indent=False)
+ for VertexCountIndex, VertexIndex in \
+ enumerate(PolygonVertexIndexes):
+
+ if VertexCountIndex == len(PolygonVertexIndexes) - 1:
+ self.Exporter.File.Write("{};".format(VertexIndex),
+ Indent=False)
+ else:
+ self.Exporter.File.Write("{},".format(VertexIndex),
+ Indent=False)
if Index == PolygonCount - 1:
self.Exporter.File.Write(";\n", Indent=False)
@@ -569,9 +575,13 @@ class MeshExportObject(ExportObject):
self.Exporter.File.Write("{};".format(len(Polygon)))
# Reverse the winding order
- for VertexIndex in Polygon[::-1]:
- self.Exporter.File.Write("{},".format(VertexIndex),
- Indent=False)
+ for VertexCountIndex, VertexIndex in enumerate(Polygon[::-1]):
+ if VertexCountIndex == len(Polygon) - 1:
+ self.Exporter.File.Write("{};".format(VertexIndex),
+ Indent=False)
+ else:
+ self.Exporter.File.Write("{},".format(VertexIndex),
+ Indent=False)
if Index == FaceCount - 1:
self.Exporter.File.Write(";\n", Indent=False)