--- 3ds_export.py.orig 2007-01-21 19:22:13.000000000 +0000 +++ 3ds_export.py 2007-01-21 19:22:31.000000000 +0000 @@ -547,12 +547,19 @@ index_list=[] for i,vert in enumerate(verts): index_list.append(vert_index) - for ii, uv_3ds in unique_uvs[i].itervalues(): + map = {} + for ii, uv_3ds in unique_uvs[i].itervalues(): # add a vertex duplicate to the vertex_array for every uv associated with this vertex: vert_array.add(_3ds_point_3d(vert.co)) - # add the uv coordinate to the uv array: - uv_array.add(uv_3ds) + #uv_array.add(uv_3ds) + # This for loop does not give uv's ordered by ii, so we create a new map + # and add the uv's later + map[ii] = uv_3ds vert_index+=1 + # Add the uv's in the correct order + for iii in xrange(len(map)): + # add the uv coordinate to the uv array: + uv_array.add(map[iii]) # Make sure the triangle vertex indices now refer to the new vertex list: for tri in tri_list: