work on world

This commit is contained in:
2026-03-16 15:35:31 +02:00
parent c05bca6d27
commit 6d5141cf43
33 changed files with 416 additions and 100 deletions

View File

@@ -23,7 +23,7 @@ class ExportFunnyMesh(Operator, ExportHelper):
filename_ext = ".fmesh_c"
filter_glob: StringProperty(
default="*.map",
default="*.fmesh_c",
options={'HIDDEN'},
)
@@ -44,8 +44,8 @@ def export_my_format(filepath):
world_pos = obj.matrix_world @ vert.co
world_normal = obj.matrix_world @ vert.normal
f.write(struct.pack('f', world_pos.x))
f.write(struct.pack('f', world_pos.y))
f.write(struct.pack('f', world_pos.z))
f.write(struct.pack('f', world_pos.y))
if uv_layer:
uv = uv_layer[loop_index].uv
f.write(struct.pack('f', uv.x))
@@ -54,8 +54,8 @@ def export_my_format(filepath):
f.write(struct.pack('f', 0))
f.write(struct.pack('f', 0))
f.write(struct.pack('f', world_normal.x))
f.write(struct.pack('f', world_normal.y))
f.write(struct.pack('f', world_normal.z))
f.write(struct.pack('f', world_normal.y))
return {'FINISHED'}