I need to export the list of vertices, which I do somewhat like this:
float $vert = `getAttr ($mesh+".vt["+$i+"]")`;
-> export data
The vertices end up in a list, and with the indexes of the list I build the faces like this:
0.222780; 0.428977; 0.205035;
0.259622; 0.438517; 0.523871;
0.150889; 0.527702; 0.308754;
0.150889; 0.576815; 0.483982;
2, 1, 0;
3, 1, 2;
5, 2, 4;
5, 3, 2;
The problem is that this doesn't give me correct results when a vertex has unshared normals or unshared UV's. For that I need to export the face-vertices, not the normal vertices.
Is there an easy way to export the face-vertices like this, and get a list of the indexes to the face vertices building up the faces? The only way I could do it now would be to sort a lot of stuff by hand, which is going to be dreadfully slow.