Texturefilename exporter only returns crippled filenames

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
blackie
Posts: 0
Joined: Mon Apr 28, 2003 5:15 pm

Texturefilename exporter only returns crippled filenames

Post by blackie »

Hello everyone!

I've written an exporter for some meshes and it also exports the texture filenames. This works ok for small filenames but if the filename is longer than 21 chars, then the rest is cut. The funny thing is that the texture works inside of blender and shows correctly. Is this problem known? Or this just a limitation of the python api?

Any help is really appreciated.

Thanks and greetings

Stefan

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d »

clearly you're doing the wrong thing, using the name of the image datablock instead of getting the filename

Code: Select all

import Blender 
ob = Blender.Object.GetSelected()[0] 
me = ob.getData() 
print me.faces[0].image.getFilename()

blackie
Posts: 0
Joined: Mon Apr 28, 2003 5:15 pm

Post by blackie »

Oh thanks, thats it! Oops :-)

Post Reply