Output face animation to centered coordinates.

This commit is contained in:
Nathan Vegdahl 2022-06-10 11:33:40 -07:00
parent 247d2b73d0
commit 159359540c
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@ -78,7 +78,9 @@ if __name__ == "__main__":
mdd.write(pack(">3f", 0.0, 0.0, 0.0)) mdd.write(pack(">3f", 0.0, 0.0, 0.0))
else: else:
for point in mesh: for point in mesh:
mdd.write(pack(">3f", point.x, point.y / aspect_ratio, point.z)) x = point.x - 0.5
y = point.y - 0.5
mdd.write(pack(">3f", x, y / aspect_ratio, point.z))
i += 1 i += 1
print("\rWrote {} frames. ".format(len(meshes))) print("\rWrote {} frames. ".format(len(meshes)))