# does this work for you?

import maya.cmds as cmds


sg = cmds.ls(sl=1)[0]


nodes = cmds.listHistory(sg)

print nodes




On Sep 16, 3:56 pm, Christian Akesson <[email protected]> wrote:
> Given a shading engine, is there an easy way to query the shading network
> nodes (materials, placementNodes, fileNodes etc?
>
> Found and played around with shadingNetworkCompare, but I can't really get
> this to work.
> myComp = pm.shadingNetworkCompare('blinn1SG', initialShadingGroup')
> print pm.shadingNetworkCompare(myComp, query=True, network1=True)
>
> Always seems to give me an empty list no matter what SG's I input.....
> Before writing my own method, I wanted to see if PyMel had a magic
> bullet....
> Thanks,
>
> /Christian

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to