Auto UdimName

Maya3 字

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

admin
博学之,审问之,慎思之,明辨之,笃行之。
OωO
开启隐私评论,您的评论仅作者和评论双方可见