mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-16 21:25:52 +00:00
Remove awful edge-indexing bottleneck
This commit is contained in:
parent
eb5cdf40b0
commit
98c2313863
@ -272,8 +272,8 @@ def cookcol(writebuf, mesh_obj):
|
|||||||
writebuf(struct.pack('I', len(copy_mesh.polygons)))
|
writebuf(struct.pack('I', len(copy_mesh.polygons)))
|
||||||
for p in copy_mesh.polygons:
|
for p in copy_mesh.polygons:
|
||||||
edge_idxs = []
|
edge_idxs = []
|
||||||
for ek in p.edge_keys:
|
for loopi in p.loop_indices:
|
||||||
edge_idxs.append(copy_mesh.edge_keys.index(ek))
|
edge_idxs.append(copy_mesh.loops[loopi].edge_index)
|
||||||
writebuf(struct.pack('IIII', edge_idxs[0], edge_idxs[1], edge_idxs[2], p.material_index))
|
writebuf(struct.pack('IIII', edge_idxs[0], edge_idxs[1], edge_idxs[2], p.material_index))
|
||||||
|
|
||||||
# Delete copied mesh from scene
|
# Delete copied mesh from scene
|
||||||
|
Loading…
x
Reference in New Issue
Block a user