Instantly share code, notes, and snippets.

@fereria / Secret
Last active Aug 29, 2015

What would you like to do?
import pymel.core as pm
def getUseTextureThisGrp(grp):
if isinstance(grp,str) == True:
grp = pm.PyNode(grp)
shapes = grp.listRelatives(ad=True,type="mesh")
files = []
for i in shapes:
sEngines = i.connections(type="shadingEngine")
for s in sEngines:
shaderList = s.surfaceShader.connections()
for shader in shaderList:
fNode = shader.connections(type="file")
for tex in fNode:
files = list(set(files))
return files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment