def channelbox_menu_custom(box, item_key, item_type, label, command, parent, enabled):
if item_key == "selectFilterSet":
m_item = cmds.menuItem(l=label, en=enabled, subMenu=1, p=parent)
for f in box.saved_states["savedFilters"][0]:
item = cmds.menuItem(l=f, p=m_item)
item_ob = cmds.menuItem(l=f, ob=1, p=m_item)
cmds.menuItem(item, e=1, c=sysCmd.rpartial(command, box, item, item_key))
cmds.menuItem(item_ob, e=1, c=sysCmd.rpartial(command, box, item_ob, item_key))
# ----------------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------------- #
# CUSTOM MENU "Objects" : Use this also as an example for implementing a custom menu
# ----------------------------------------------------------------------------------- #
评论列表
文章目录