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");')
--
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 python_inside_m...@googlegroups.com.
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.
mm.eval('hyperShadePanelGraphCommand("hyperShadePanel1","showUpAndDownstream");')I suspect you're looking at the graph of the transform, as opposed to the shape node. Try "pCubeShape1" instead and see if that works better.
As for tearing out, you can hide the top and left part of the hypershade to make it into a workarea-only. Alternatively you've got the Node Editor which is essentially just that.
On 18 July 2014 11:58, likage <dissid...@gmail.com> wrote:
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 python_inside_maya+unsub...@googlegroups.com.
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.