def getSelectedChannels():
'''
Return channels that are selected in the channelbox
'''
if not mc.ls(sl=True):
return
gChannelBoxName = mm.eval('$temp=$gChannelBoxName')
sma = mc.channelBox(gChannelBoxName, query=True, sma=True)
ssa = mc.channelBox(gChannelBoxName, query=True, ssa=True)
sha = mc.channelBox(gChannelBoxName, query=True, sha=True)
channels = list()
if sma:
channels.extend(sma)
if ssa:
channels.extend(ssa)
if sha:
channels.extend(sha)
return channels
评论列表
文章目录