diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py index 6c80a390082e378f9417b4cfd4de5ce53efa8f74..a59c94d6d05d561b7f108045b3057ee64f5b4c73 100644 --- a/io_mesh_ply/import_ply.py +++ b/io_mesh_ply/import_ply.py @@ -243,6 +243,8 @@ def load_ply_mesh(filepath, ply_name): 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 @@ def load_ply_mesh(filepath, ply_name): 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']))