General Category > ASL Scripts
How to get full texture filename?
Jolly Roger:
The example c export plugin script writes the name of the texture to file but don't include it's extension (jpg, gif, bmp).
How would I go about getting the full filename of a texture?
Thanks.
Roger
Claude:
From the script spec:
Texture Type
struct texture {
string name; // texture’s name
int Marked; // Marked flag, 1 or 0
const int CubeMap; // 1 if a Cube Map, else 0
int InvertImage; // invert image flag, 1 or 0
string GetFileName(void);
string GetCubeMapFileName(int face);
int SetFileName(string name);
int SetCubeMapFileName(string name, int face);
};
He's probably using the name member.
Try the "string GetFileName(void)" one.You should get the extension
and the directory also if my memory doesn't fail me.
Steve:
That's correct. The name field is the testure's name as used within Anim8or. The GetFileName() function returns the file name.
Jolly Roger:
Thanks for your help.
Roger
Jolly Roger:
I've tried tinkering with the code but I can't seem to get it to work. Although I'm no stranger to programming I know next to nothing about c.
I'd be grateful for a snippet of code to show me how to do this.
Thanks.
Roger
Navigation
[0] Message Index
[#] Next page
Go to full version