Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #change texture info
- from pymel.core import *
- sl = selected()
- matTypeList = ["lambert","blinn","phong"]
- fileType = "jpg"
- for s in sl:
- sg = s.getShape().listConnections()[0]
- sM = sg.listConnections(type = "lambert")[0]
- sT = listConnections(str(sM)+".color")
- sTfile = getAttr(sT[0]+".fileTextureName")
- sTfile = sTfile[:-3]+fileType
- setAttr(sT[0]+".fileTextureName", sTfile)
- print sTfile
Advertisement
Add Comment
Please, Sign In to add comment