jtChannelBox_Commands_Default.py 文件源码

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

项目:ModularChannelBox 作者: Vaei 项目源码 文件源码
def channelbox_command_setChannelName(box, menuItem, key, *args):
    # set display type for the names in the channel box and adjust the width of the columns displaying the label
    with sysCmd.Undo(0):
        state = 1 if key == "nameNice" else 2 if key == "nameLong" else 3

        if state == 1:
            width = 180
            cmds.channelBox(box.channelbox, e=1, lw=width, ln=1, nn=1)
        elif state == 2:
            width = 180
            cmds.channelBox(box.channelbox, e=1, lw=width, ln=1, nn=0)
        else:
            width = 140
            cmds.channelBox(box.channelbox, e=1, lw=width, ln=0, nn=0)

        box.saved_states["namesState"][0] = state
        box.saved_states["channelWidth"][0] = width

        sysCmd.channelbox_save_state(box)


# -----------------------------------------  

# --------------- SHOW MENU ---------------  
# -----------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号