Nothing fancy, I was just sitting there wishing DBP had a way to get the texturename of a model (for saving objects in a level editor) and came up with these.
image number to filename function (you can add your own find free object code):
load image "AlgaeBricks.bmp", 1
do
cls
print index_to_name( 1 )
loop
end
function index_to_name( image )
make object triangle 1,0,0,0,0,0,0,0,0,0
texture object 1,image
test$ = LIMB TEXTURE NAME(1, 0)
delete object 1
endfunction test$
And if you don't know the image number of a limb (if you loaded a model) you can use:
Return Integer=LIMB TEXTURE(Object Number, Limb Number)
to get the image number.