mtoa:
def Auto_Udim():
import maya.cmds as cmds
list_file=cmds.ls(type='file')
project_path=cmds.workspace( listWorkspaces=True )
for n in range(0,len(list_file)):
filename=cmds.getAttr(list_file[n]+'.fileTextureName')
udim=filename.split(".")
ifdir=filename.split(":")
udimn=udim[(len(udim)-2)]
try:
if int(udimn)>1000:
udim[len(udim)-2]='<udim>'
udimfilename='.'.join(udim)
cmds.setAttr(list_file[n]+'.fileTextureName',udimfilename,type="string")
except:
print filename
if filename[1]!=':':
udimfilename=('.'.join(udim))
udimfilename=project_path[1]+'\\'+udimfilename
cmds.setAttr(list_file[n]+'.fileTextureName',udimfilename,type="string")
Auto_Udim()
vray将udim改为UDIM