jtChannelBox.py 文件源码

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

项目:ModularChannelBox 作者: Vaei 项目源码 文件源码
def channelbox_menu_object(box, menu, *args):
    cmds.menu(menu, e=1, deleteAllItems=1)

    sel = cmds.ls(os=1)

    if not sel:
        cmds.menuItem(l="Nothing selected", p=menu)
        return

    sel.reverse()
    first = 1

    for i in sel:
        m_item = cmds.menuItem(l=i, p=menu)
        m_item_box = cmds.menuItem(m_item, optionBox=1, p=menu)
        cmds.menuItem(m_item, e=1, c=sysCmd.rpartial(channelbox_command_objectmenu, box, menu, m_item, "select " + i))
        cmds.menuItem(m_item_box, e=1, c=sysCmd.rpartial(channelbox_command_objectmenu, box, menu, m_item_box, m_item,
                                                         "select " + i + " [  ]"))

        if first:
            cmds.menuItem(divider=1, p=menu)
            first = 0


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

# -----------------------------------------------------------------------------------#
# This is where the menu icons are setup
# You probably don't need to modify this, unless you have your own icons to add
# -----------------------------------------------------------------------------------#
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号