def repathTextures(cls, texList, newPath, *args, **kwargs): ''' repath the textures in a given list ''' if texList: for tex in texList: oldPath = pm.getAttr(tex+'.fileTextureName') fixedPath = path.repath(oldPath , newPath) pm.setAttr(tex+'.fileTextureName', fixedPath)
def repathTextures(cls, texList, newPath, *args, **kwargs): ''' repath the textures in a given list ''' if texList: for tex in texList: oldPath = pm.getAttr(tex + '.fileTextureName') fixedPath = path.repath(oldPath, newPath) pm.setAttr(tex + '.fileTextureName', fixedPath)
def repathShader(cls, shader, newPath, *args, **kwargs): """ reload the shader from a new path """ cgfxFile = pm.getAttr(shader+'.shader') if cgfxFile: pm.cgfxShader(shader, edit=True, fx=path.repath(cgfxFile, newPath) )