zbw_spaceMatch_overComplex.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:zTools 作者: zethwillie 项目源码 文件源码
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")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号