-
-
Save fereria/f1f04e9b347f3d7622fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.append(tex.fileTextureName.get()) | |
files = list(set(files)) | |
return files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment