Blender Texture coord export

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Hqpsy
Posts: 0
Joined: Sun May 25, 2003 12:56 am

Blender Texture coord export

Post by Hqpsy »

First of, I'm not very good at Blender..

But here is the problem:

I make a 3D shape, like a sphere or a cube, then I put a texture on it and modify it's tex coords in the texcoord editor. (It looks good in the 3d windows when I have alt-z enabled).

However, I've also written a script that exports that model into my own ascii 3d format. And it won't export the uv coords, it only put 0.000000 in that place.. here is the line in my Python script:

for vert in m.verts:
self.m_f.write("%f %f %f %f %f\n" % (vert.co[0], vert.co[1], vert.co[2],vert.uvco[0],vert.uvco[1]))

Everything else in the resulting file seems fine (like the vertexcoords)..

Do you have any clue?

nyoxi
Posts: 0
Joined: Fri Jul 25, 2003 8:14 pm

Post by nyoxi »

There is probably something wrong with UV coordinates. I know that somebody has the same problem and he asked for help (but it wasn't in this forum)

Hqpsy
Posts: 0
Joined: Sun May 25, 2003 12:56 am

Post by Hqpsy »

So can it be me messing up the coordinates somewhere or is it the blender code that fucks around?

assassin
Posts: 0
Joined: Sat Aug 09, 2003 12:47 pm

Post by assassin »

Hi. I had this problem and I solved it yesterday.
You can fuck this shit by pressing in editor buttons window.

First you have to click on an object.

Than there are three buttons
make sticky
make vertCol
make TexFace.

Those buttons are on the bottom of the editor buttons window.

Hqpsy
Posts: 0
Joined: Sun May 25, 2003 12:56 am

Post by Hqpsy »

I get no rid of it.

Maybe, the texture coordinates are stored in the face and not in the vertex?

Post Reply