[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4504] trunk/py/scripts/addons/ io_scene_x/export_x.py: - Fixed UV coordinate export ( V coordinates were flipped for some reason)

Chris Foster cdbfoster at gmail.com
Mon May 6 06:43:16 CEST 2013


Revision: 4504
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4504
Author:   kiravakaan
Date:     2013-05-06 04:43:16 +0000 (Mon, 06 May 2013)
Log Message:
-----------
- Fixed UV coordinate export (V coordinates were flipped for some reason)
- Corrected a couple comma formatting issues.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_scene_x/export_x.py

Modified: trunk/py/scripts/addons/io_scene_x/export_x.py
===================================================================
--- trunk/py/scripts/addons/io_scene_x/export_x.py	2013-05-04 23:25:39 UTC (rev 4503)
+++ trunk/py/scripts/addons/io_scene_x/export_x.py	2013-05-06 04:43:16 UTC (rev 4504)
@@ -472,7 +472,7 @@
             PolygonVertexIndexes = PolygonVertexIndexes[::-1]
             
             for VertexIndex in PolygonVertexIndexes:
-                self.Exporter.File.Write("{};".format(VertexIndex),
+                self.Exporter.File.Write("{},".format(VertexIndex),
                     Indent=False)
             
             if Index == PolygonCount - 1:
@@ -570,7 +570,7 @@
             
             # Reverse the winding order
             for VertexIndex in Polygon[::-1]:
-                self.Exporter.File.Write("{};".format(VertexIndex),
+                self.Exporter.File.Write("{},".format(VertexIndex),
                     Indent=False)
             
             if Index == FaceCount - 1:
@@ -606,7 +606,7 @@
                 Vertices.append(tuple(Vertex.uv))
             for Vertex in Vertices:
                 self.Exporter.File.Write("{:9f};{:9f};".format(Vertex[0],
-                    Vertex[1]))
+                    1.0 - Vertex[1]))
                 Index += 1
                 if Index == VertexCount:
                     self.Exporter.File.Write(";\n", Indent=False)



More information about the Bf-extensions-cvs mailing list