fix error

This commit is contained in:
gsemaj 2023-09-09 10:43:43 -07:00
parent 03a3e21532
commit af2988e062
No known key found for this signature in database
GPG Key ID: 24B96BAA40497929

View File

@ -80,6 +80,10 @@ def rip_terrain_mesh(f, outpath, clear=False):
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.modifier_apply(modifier="Triangulate")
bpy.ops.object.mode_set(mode="EDIT")
bm = bmesh.from_edit_mesh(context.edit_object.data)
bm.verts.ensure_lookup_table()
# flip diagonally
for v in bm.verts:
tmp = v.co.x