[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4666] trunk/py/scripts/addons/ io_mesh_ply/import_ply.py: patch [#36407] Triangle strip support in PLY file importer
Campbell Barton
ideasman42 at gmail.com
Fri Aug 9 23:13:56 CEST 2013
Revision: 4666
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4666
Author: campbellbarton
Date: 2013-08-09 21:13:56 +0000 (Fri, 09 Aug 2013)
Log Message:
-----------
patch [#36407] Triangle strip support in PLY file importer
from Eric Saari (esaari1)
Modified Paths:
--------------
trunk/py/scripts/addons/io_mesh_ply/import_ply.py
Modified: trunk/py/scripts/addons/io_mesh_ply/import_ply.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_ply/import_ply.py 2013-08-09 09:14:54 UTC (rev 4665)
+++ trunk/py/scripts/addons/io_mesh_ply/import_ply.py 2013-08-09 21:13:56 UTC (rev 4666)
@@ -243,6 +243,8 @@
elif el.name == b'face':
findex = el.index(b'vertex_indices')
+ elif el.name == b'tristrips':
+ trindex = el.index(b'vertex_indices')
mesh_faces = []
mesh_uvs = []
@@ -286,6 +288,13 @@
for j in range(len_ind - 2):
add_face(verts, (ind[0], ind[j + 1], ind[j + 2]), uvindices, colindices)
+ if b'tristrips' in obj:
+ for t in obj[b'tristrips']:
+ ind = t[trindex]
+ len_ind = len(ind)
+ for j in range(len_ind - 2):
+ add_face(verts, (ind[j], ind[j + 1], ind[j + 2]), uvindices, colindices)
+
mesh = bpy.data.meshes.new(name=ply_name)
mesh.vertices.add(len(obj[b'vertex']))
More information about the Bf-extensions-cvs
mailing list