newNameList = #() fn newTex tex = ( if (classof tex) == Bitmaptexture do( oldFilename = copy tex.filename nList = filterString oldFilename "\\" theName = nList[nList.count] if theName.count > 12 do( newName = (subString theName 1 8) + (subString theName (theName.count-3) (theName.count)) num=1 while (finditem newNameList newName) != 0 do( if num>=100 then (newName = replace newName 6 3 (num as string)) else if num>=10 then (newName = replace newName 7 2 (num as string)) else (newName = replace newName 8 1 (num as string)) num+=1 ) append newNameList newName newFilename = replace oldFilename (findString oldFilename theName) (theName.count) newName copyFile oldFileName newFilename tex.filename = newFilename ) ) ) fn texFilter mat = ( if mat != undefined do( for k =1 to (getNumSubTexmaps mat) do( tex = getSubTexmap mat k if tex != undefined do( newTex tex ) ) ) ) sL = scenematerials for i=1 to sL.count do( if (classof sL[i]) == Multimaterial then( for j=1 to sL[i].materiallist.count do( texFilter sL[i].materiallist[j] ) ) else ( texFilter sL[i] ) )