Commit 6ce6e841 authored by Dario Seyb's avatar Dario Seyb

Generate normals even when we don't have any face indices

parent 2ac18cca
...@@ -12,10 +12,11 @@ def calculateNormalEdges(vertices, face_indices, normals, length): ...@@ -12,10 +12,11 @@ def calculateNormalEdges(vertices, face_indices, normals, length):
for face in face_indices: for face in face_indices:
face_centers.append(np.average(vertices[face], axis=0, weights=face!=-1)) face_centers.append(np.average(vertices[face], axis=0, weights=face!=-1))
vertices = face_centers vertices = face_centers
else: elif face_indices is not None:
resolved_normals = resolve_attributes(face_indices, [normals])[0] resolved_normals = resolve_attributes(face_indices, [normals])[0]
vertices, face_indices = stretch_vertices(vertices, face_indices) vertices, face_indices = stretch_vertices(vertices, face_indices)
else:
resolved_normals = normals
edge_vertices = [] edge_vertices = []
edge_indices = [] edge_indices = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment