well, another script request by me,
for my project I also need to reduce the number of characters from each bitmap. With the actual bitmaps on the hard drive, this is no problem.
But within 3ds-Max the bitmapName also needs reduction to 16 characters.
I tried this, based on anton berg's earlier script and an object rename script I found on the net;
----------------
--yourmaterial = $.material -- get the material you want to work on from the selected object
yourmaterial = medit.GetCurMtl() --get the current selected material in the material editor slot
numberOfSubMats = yourmaterial.numsubs --how many submaterials exist in the selected material
for i = 1 to numberOfSubmats do
(
try
(
startVal = 1
endVal = 16
bitmapName = getFilenameFile yourmaterial[i].diffusemap.filename
yourmaterial[i].diffusemap.filename = replace bitmapName ((endVal-startVal)+1) ""
)
catch (
print ("could not set name for this bitmap" + yourmaterial[i].diffusemap.filename)
)
)
-----------------
doesn't work however. Can someone tell me what the problem could be?
Maybe I'm totally off here, but at least i should be able to do something with the number of characters, as a list or a string or something?
Harmalarm