# Importing UV coordinates

I'm currently writing an import script/addon.

The file format is one vertex per line: x, y, z, u, v With 3 lines for each triangle (no quads).

So far I've got vertex's, edges and faces all importing correctly.

Now I just need to import the UV coordinates for each vertex.

However I'm having trouble trying to find a way to do this.

The best result so far was copying code from the UV operator template, which gave me a UV Map, but it puts the whole model at one point.

• You'll probably find looking at other import scripts helpful - in the obj script I see me.tessface_uv_textures.new() blender_tface = me.tessface_uv_textures[0].data[i] and blender_tface.uv1 = verts_tex[face_vert_tex_indices[0]] – sambler Dec 18 '13 at 11:48
• I posted an example on blenderartists.org, which assumes you use polys/loops for your mesh import: Importing UV coordinates – CoDEmanX Dec 18 '13 at 15:11
• @CoDEmanX this is a rather good question. perhaps your post on BA could be summarized here. – ideasman42 May 16 '14 at 14:43