3
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ 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]] $\endgroup$
    – sambler
    Commented Dec 18, 2013 at 11:48
  • $\begingroup$ I posted an example on blenderartists.org, which assumes you use polys/loops for your mesh import: Importing UV coordinates $\endgroup$
    – CodeManX
    Commented Dec 18, 2013 at 15:11
  • $\begingroup$ @CoDEmanX this is a rather good question. perhaps your post on BA could be summarized here. $\endgroup$
    – ideasman42
    Commented May 16, 2014 at 14:43

0

You must log in to answer this question.

Browse other questions tagged .