def getOutput(*args):
""" collects the outputs from the selected obj.channel"""
obj = ""
channel = ""
conv = cmds.checkBox(widgets["conversionCB"], q=True, v=True)
cBox = mel.eval('$temp=$gChannelBoxName')
sel = cmds.ls(sl=True, l=True)
if sel:
if not len(sel) == 1:
cmds.warning("You have to select ONE node!")
else:
obj = sel[0]
else:
cmds.warning("You have to select ONE node!")
if sel:
channels = cmds.channelBox(cBox, q=True, sma=True, ssa=True, sha=True, soa=True)
if channels:
if not len(channels) == 1:
cmds.warning("You have to select ONE channel!")
else:
channel = channels[0]
else:
cmds.warning("You have to select ONE channel!")
if obj and channel:
full = "%s.%s" % (obj, channel)
outAttr = cmds.listConnections(full, plugs=True, scn=conv, d=True, s=False)
if outAttr:
for each in outAttr:
print "%s ----> %s" % (full, each)
else:
cmds.warning("No output connections on this attr!")
outNodes = cmds.listConnections(full, scn=conv, d=True, s=False)
if outNodes:
cmds.select(cl=True)
for node in outNodes:
cmds.select(node, add=True)
评论列表
文章目录