Use xrange instead of range when exporting to collada.

This avoids creating a giant temporary list for large meshes.
This commit is contained in:
Jeff Terrace
2017-05-12 09:28:54 -07:00
committed by GitHub
parent 4cf4a3954e
commit 1a906a9242

View File

@@ -212,7 +212,7 @@ def export(exportList,filename,tessellation=1):
n = f.Normal
nindex.extend([n.x,n.y,n.z])
# face indices
for i in range(len(m.Topology[1])):
for i in xrange(len(m.Topology[1])):
f = m.Topology[1][i]
findex.extend([f[0],i,f[1],i,f[2],i])
print(len(vindex), " vert indices, ", len(nindex), " norm indices, ", len(findex), " face indices.")