Hi there,
I’m trying to create a dictionary for all of my materials within maya. The shading engine as the key, and their material as the value. I’ve tried listing all the shading engines, and then listing the relatives to those, with the type “aiStandardSurface”. But maya is telling me that “aiStandardSurface” is a non. And if I try to find the type of an aiStandard called dogs or w/e, it tell me that it is of type “aiStandardSurface”.
I’ve also tried listing lambert as well but I get a “none” too.
Any insight would be greatly appreciated! Thanks!
import maya.cmds as mc
mat_dict= {}
for SG in mc.ls(type='shadingEngine'):
mat = mc.listRelatives(type='aiStandardSurface')
print mat
mat_dict[SG] = mat
for x in mat_dict:
print(mat_dict[x])