Yo, im stuck with an export script I made. Basically, it (should) just write to a text file, of which my games can read. Currently I can export vertices and co-ords, now I just need UV mapping, which is where my problem begins
So I have this little section of code for the face saving.
for i in range(len(mesh.faces)):
file.write("faceLoad("+`i`+","+`len(mesh.faces[i].v)`)
mesh.faces[i].v.reverse()
for j in range(len(mesh.faces[i].v)):
file.write(","+`mesh.faces[i].v[j].index`)
for j in range(len(mesh.faces[i].v)):
file.write(","+`mesh.faces[i].uv`)
file.write(")
")
which will give me this in the file:
faceLoad(0,3,2,0,1,[(1.0, 0.0), (1.0, 1.0), (0.0, 0.0)],[(1.0, 0.0), (1.0, 1.0), (0.0, 0.0)],[(1.0, 0.0), (1.0, 1.0), (0.0, 0.0)])
The paramters there are something like faceLoad(facenumber,verts,vert1number,vert2number,vert3number,UVxlist,UVylist)
but I don’t know how the UV lists are stored…
I bet thats confusing =p
Tobs