Merge branch 'sevaa-feature_x3d_file_format'

This commit is contained in:
Ghostkeeper 2016-09-20 11:49:39 +02:00
commit bc6e7dd24e
No known key found for this signature in database
GPG key ID: 701948C5954A7385
3 changed files with 941 additions and 1 deletions

View file

@ -160,7 +160,12 @@ class StartSliceJob(Job):
obj = group_message.addRepeatedMessage("objects")
obj.id = id(object)
verts = numpy.array(mesh_data.getVertices())
verts = mesh_data.getVertices()
indices = mesh_data.getIndices()
if indices is not None:
verts = numpy.array([verts[vert_index] for face in indices for vert_index in face])
else:
verts = numpy.array(verts)
# Convert from Y up axes to Z up axes. Equals a 90 degree rotation.
verts[:, [1, 2]] = verts[:, [2, 1]]