I am trying to graph out the selected object shader and it will displays
its input and output connections.
While it works, the display of input and output connections is not working,
unless I have to open up my script editor and re-run the command again.
I am testing it with a simple scene, where I create a polyCube and attach
it with a blinn. So basically the idea is that it will pops up the
hypershade and graph out the connections in the work area of hypershade
Any ideas?
import maya.cmds as cmds
import maya.mel as mm
cmds.select("pCube1")
shapeSel = cmds.ls(dag=1,o=1,s=1,sl=1)
shadingGrp = cmds.listConnections(shapeSel,type='shadingEngine')
shader = cmds.ls(cmds.listConnections(shadingGrp),materials=1)
cmds.HypershadeWindow()
cmds.select(shader)
# This command needs to be manually run
mm.eval(
'hyperShadePanelGraphCommand("hyperShadePanel1","showUpAndDownstream");')
Additionally, can I also ask if it is possible to 'tear out' the window of
the work area or the material tab?
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/dd36abfa-c165-4e57-a1cc-46ff7466d692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.