def getAttr(*args):
"""grabs the selected channel from the selected obj and puts the enum values into the list"""
#--------here could require a channel of a specific name, then you could do it automagically (check for "follow", "spaces", "space", "ss", etc)
obj = cmds.textFieldGrp(widgets["objTFG"], q=True, tx=True)
cmds.select(obj, r=True)
channels = cmds.channelBox ('mainChannelBox', query=True, selectedMainAttributes=True)
print channels
if (channels and (len(channels)==1)):
if (cmds.attributeQuery(channels[0], node=obj, enum=True)):
enumValue = cmds.attributeQuery(channels[0], node=obj, listEnum=True)
values = enumValue[0].split(":")
for value in values:
cmds.textScrollList(widgets["spacesTSL"], e=True, append=value)
#----------create a button for each one???
#----------or have them be double clicked???
else:
cmds.warning("select only the enum space switch channel")
评论列表
文章目录