The problem happens when some Arnold nodes, for example the aiLayerRgba or the aiShuffle node. When any of them is in a shading network that is passing it's .outAlpha value down to the connections, it will block the command to retrieve the shadingEngine node.
Repro steps:
1) Load the attached scene
2) Run the following script:
import pymel.core as pm
node = pm.PyNode('aiImage1')
result = node.shadingGroups()
print(result)
Result: An empty list is returned:
Expected result: [nt.ShadingEngine(u'aiStandardSurface1SG')] should be returned.
In the scene if connecting aiLayerRgba1.outColor (instead of outAlpha) to aiStandardSurface1.baseColor, the script will work as expected.
The problem happens when some Arnold nodes, for example the
aiLayerRgba
or theaiShuffle
node. When any of them is in a shading network that is passing it's.outAlpha
value down to the connections, it will block the command to retrieve the shadingEngine node.Repro steps: 1) Load the attached scene 2) Run the following script: import pymel.core as pm node = pm.PyNode('aiImage1') result = node.shadingGroups() print(result)
Result: An empty list is returned: Expected result: [nt.ShadingEngine(u'aiStandardSurface1SG')] should be returned.
In the scene if connecting aiLayerRgba1.outColor (instead of outAlpha) to aiStandardSurface1.baseColor, the script will work as expected.
test_.ma.zip