This is also assuming that the shader's you're looking for connect to geo through the shadingGroup. If it doesn't you'll have to check against whatever that connection is.
On Wednesday, October 24, 2012 12:31:24 PM UTC-7, Jesse Capper wrote: > > Try listing connections to the shape, not the transform. > > http://pastebin.com/TjjW3ze9 > > > On Wednesday, October 24, 2012 12:07:19 PM UTC-7, Berg Jones wrote: >> >> Hmmm perhaps I havent been clear enough: >> >> >> - I have a 1,000+ line renderman rsl surface shader as well as a >> separate uber shader for lights >> - The system provides interactive relighting of a scene (without >> exporting to a compositor) depending on attributes changed as rasterizing >> and shading are broken up into two stages. >> - I can only check against one uber surface shader as opposed to >> multiple smaller shaders. Each object is assigned a separate uber surface >> shader >> - I need to find out what geo is connected to what shader. >> >> >> This returns none >> >> import maya.cmds as cmds >> >> objNames = cmds.ls(sl=1) >> >> for i in objNames: >> >> print i >> >> connectedToObj = cmds.listConnections(i) >> >> print connectedToObj >> >> pSphere3 >> >> None >> >> >> >> -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
