Rename texture name

The scene have many textures, but the texture name is not correct. I want to rename the textures, and the link of texture should be keep!

I'm sorry for my bad english,I wish you can understand it.

Can someone help me? So thanks!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
SmallGhost's picture

So thanks for your help!

I test it...

Yes,the bitmap name is changed,but the bitmap lost the link. The bitmap which is saved in disk is not changed name with it.

theMaps = getClassInstances BitmapTexture
for i in 1 to theMaps.count do
(
fileName = theMaps[i].filename
newFilename = getFilenamePath fileName + "\\map_" + i as string + getFilenameType fileName
if renameFile fileName newFilename then theMaps[i].filename = newFilename
)

this is someone help to change the bitmap name,but it can't change others except the diffuse channel....

Thank you for your help!

SmallGhost's picture

Thanks br0t! I will try it.

Thanks br0t!

I will try it.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.