Added Face4 support for .obj

Este commit está contenido en:
Thomas FORGIONE 2016-12-02 09:26:07 +01:00
padre 69286684d5
commit 6c1e288b78
No se encontró ninguna clave conocida en la base de datos para esta firma
ID de clave GPG: 2A210FFC062E00C3

Ver fichero

@ -47,9 +47,21 @@ class OBJParser(ModelParser):
if splits[i][j] is not '':
splits[i][j] = int(splits[i][j]) - 1
# if Face3
if len(split) == 3:
face = Face().from_array(splits)
face.material = self.current_material
self.add_face(face)
elif len(split) == 4:
face = Face().form_array(splits[:3])
face.material = self.current_material
self.add_face(face)
face = Face().from_array([splits[0], splits[2], splits[3]])
face.material = self.current_material
self.add_face(face)
else:
print('Face with more than 4 vertices are not supported', file=sys.stderr)
class MTLParser: