I have some weird problem with Maya Python cmds library. I need obtain all shading engines in scene, so I list materials then loop thorugh them to get connections. Something like that:
for material in scene_materials:
scene_shading_groups = cmds.listConnections(material, type=‘shadingEngine’)
The problem is that it return different data in two class. In one class it’s work fine and i get all shading engines but when I try to use it in secound class it return onyl deffault shading engines
([u’initialParticleSE’, u’initialShadingGroup’, u’initialParticleSE’]).
Secound class is created in first class but in both I use same cmds command “cmds.listConnections(material, type=‘shadingEngine’)”
It’s working as a Shutgrid hook. Do anybody know what can cause this behavior?