[pyassimp] sample.py: only iterate on existing texture coords

pull/8/merge^2
Séverin Lemaignan 2012-10-17 12:06:12 +02:00
parent 3518232ddb
commit 0bda286360
1 changed files with 5 additions and 6 deletions

View File

@ -50,12 +50,11 @@ def main(filename=None):
else:
print " no normals"
print " colors:", len(mesh.colors)
tc = mesh.texturecoords
if tc:
print " texture-coords 1:", len(tc[0]), "first3:", tc[0][:3]
print " texture-coords 2:", len(tc[1]), "first3:", tc[1][:3]
print " texture-coords 3:", len(tc[2]), "first3:", tc[2][:3]
print " texture-coords 4:", len(tc[3]), "first3:", tc[3][:3]
tcs = mesh.texturecoords
if tcs:
for index, tc in enumerate(tcs):
print " texture-coords "+ str(index) + ":", len(tcs[index]), "first3:", tcs[index][:3]
else:
print " no texture coordinates"
print " uv-component-count:", len(mesh.numuvcomponents)