Nice!! Did not knw you could do that. Not in front of a machine right now but I will try this out.
I already wrote a flexible method to query a shading network for various types of nodes but this can simplify that one a great deal, thanks! /Christian - Sent from my iPhone - On Sep 17, 2010, at 12:18, Ling <[email protected]> wrote: > # 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 -- http://groups.google.com/group/python_inside_maya
