mirror of https://github.com/AxioDL/metaforce.git
MAPA generation fix
This commit is contained in:
parent
73a043035d
commit
942032688d
|
@ -44,7 +44,7 @@ def cook(writebuf, mesh_obj):
|
||||||
|
|
||||||
# Create map surfaces and borders
|
# Create map surfaces and borders
|
||||||
island_faces = list(bm_master.faces)
|
island_faces = list(bm_master.faces)
|
||||||
prev_loop_emit = None
|
#prev_loop_emit = None
|
||||||
out_count = 0
|
out_count = 0
|
||||||
loop_ranges = []
|
loop_ranges = []
|
||||||
loop_iter = 0
|
loop_iter = 0
|
||||||
|
@ -91,15 +91,8 @@ def cook(writebuf, mesh_obj):
|
||||||
loop_set = set()
|
loop_set = set()
|
||||||
edge_set = set()
|
edge_set = set()
|
||||||
loop_count = len(max_sl)
|
loop_count = len(max_sl)
|
||||||
if prev_loop_emit:
|
|
||||||
vert_pool.loop_out_map(writebuf, prev_loop_emit)
|
|
||||||
vert_pool.loop_out_map(writebuf, max_sl[0])
|
|
||||||
loop_count += 2
|
|
||||||
loop_set.add(prev_loop_emit)
|
|
||||||
loop_set.add(max_sl[0])
|
|
||||||
for loop in max_sl:
|
for loop in max_sl:
|
||||||
vert_pool.loop_out_map(writebuf, loop)
|
vert_pool.loop_out_map(writebuf, loop)
|
||||||
prev_loop_emit = loop
|
|
||||||
loop_set.add(loop)
|
loop_set.add(loop)
|
||||||
for edge in loop.face.edges:
|
for edge in loop.face.edges:
|
||||||
if edge.seam:
|
if edge.seam:
|
||||||
|
@ -146,7 +139,7 @@ def cook(writebuf, mesh_obj):
|
||||||
norm_avg.normalize()
|
norm_avg.normalize()
|
||||||
|
|
||||||
loop_ranges.append((loop_iter, loop_count, edge_ranges, pos_avg, norm_avg))
|
loop_ranges.append((loop_iter, loop_count, edge_ranges, pos_avg, norm_avg))
|
||||||
loop_iter += loop_count + edge_count
|
loop_iter = edge_iter
|
||||||
|
|
||||||
# No more surfaces
|
# No more surfaces
|
||||||
writebuf(struct.pack('B', 0))
|
writebuf(struct.pack('B', 0))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 165314b81794237f7a3bed10c1baafb2fc2ed9f1
|
Subproject commit 420dcee55234c718f757cb6370bbef4779bc4470
|
Loading…
Reference in New Issue