[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16050] trunk/blender/release/scripts/ ply_export.py: fix for [#17365] PLY export script writes comment in invalid way
Campbell Barton
ideasman42 at gmail.com
Mon Aug 11 05:52:22 CEST 2008
Revision: 16050
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16050
Author: campbellbarton
Date: 2008-08-11 05:52:21 +0200 (Mon, 11 Aug 2008)
Log Message:
-----------
fix for [#17365] PLY export script writes comment in invalid way
this is good for 2.47
Modified Paths:
--------------
trunk/blender/release/scripts/ply_export.py
Modified: trunk/blender/release/scripts/ply_export.py
===================================================================
--- trunk/blender/release/scripts/ply_export.py 2008-08-10 17:00:25 UTC (rev 16049)
+++ trunk/blender/release/scripts/ply_export.py 2008-08-11 03:52:21 UTC (rev 16050)
@@ -13,7 +13,7 @@
import BPyMesh
__author__ = "Bruce Merry"
-__version__ = "0.92"
+__version__ = "0.93"
__bpydoc__ = """\
This script exports Stanford PLY files from Blender. It supports normals,
colours, and texture coordinates per face or per vertex.
@@ -37,6 +37,8 @@
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Vector rounding se we can use as keys
#
+# Updated on Aug 11, 2008 by Campbell Barton
+# - added 'comment' prefix to comments - Needed to comply with the PLY spec.
#
# Updated on Jan 1, 2007 by Gabe Ghearing
# - fixed normals so they are correctly smooth/flat
@@ -162,7 +164,7 @@
file.write('ply\n')
file.write('format ascii 1.0\n')
- file.write('Created by Blender3D %s - www.blender.org, source file: %s\n' % (Blender.Get('version'), Blender.Get('filename').split('/')[-1].split('\\')[-1] ))
+ file.write('comment Created by Blender3D %s - www.blender.org, source file: %s\n' % (Blender.Get('version'), Blender.Get('filename').split('/')[-1].split('\\')[-1] ))
file.write('element vertex %d\n' % len(verts))
@@ -210,7 +212,6 @@
if faceUV: uvcoord= rvec2d(uv[j])
elif vertexUV: uvcoord= rvec2d(v.uvco)
if vertexColors: color= col[j].r, col[j].g, col[j].b
- co = v.co
file.write('%d ' % vdict[v.index][normal, uvcoord, color])
More information about the Bf-blender-cvs
mailing list