depth, normals i guess
This commit is contained in:
@@ -42,21 +42,20 @@ def export_my_format(filepath):
|
||||
for loop_index in tri.loops:
|
||||
vert = mesh.vertices[mesh.loops[loop_index].vertex_index]
|
||||
world_pos = obj.matrix_world @ vert.co
|
||||
print(world_pos.x)
|
||||
world_normal = obj.matrix_world @ vert.normal
|
||||
f.write(struct.pack('f', world_pos.x))
|
||||
print(world_pos.y)
|
||||
f.write(struct.pack('f', world_pos.y))
|
||||
print(world_pos.z)
|
||||
f.write(struct.pack('f', world_pos.z))
|
||||
if uv_layer:
|
||||
uv = uv_layer[loop_index].uv
|
||||
print(uv.x)
|
||||
f.write(struct.pack('f', uv.x))
|
||||
print(uv.y)
|
||||
f.write(struct.pack('f', uv.y))
|
||||
else:
|
||||
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))
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
BIN
tools/cube.fmesh_c
Normal file
BIN
tools/cube.fmesh_c
Normal file
Binary file not shown.
Reference in New Issue
Block a user