Exemplo n.º 1
0
def addmenu():
    global _menu
    global _menuItems
    with mayautils.undo_on_error():
        _menu = pmc.menu('HDR Interpolation', parent=mayautils.get_main_window_name())
        item = pmc.menuItem(parent=_menu, label='Show Menu', command=show)
        _menuItems.append(item)
Exemplo n.º 2
0
def addmenu():
    global _menu
    global _menuItems
    with mayautils.undo_on_error():
        _menu = pmc.menu('HDR Interpolation',
                         parent=mayautils.get_main_window_name())
        item = pmc.menuItem(parent=_menu, label='Show Menu', command=show)
        _menuItems.append(item)
Exemplo n.º 3
0
def make_test_items():
    menu = pmc.menu(
        'DemoMenu', parent=mayautils.get_main_window_name())
    def makeitem(ind):
        def callback(_):
            print 'Item', ind
        item = pmc.menuItem(
            parent=menu, label='Item %s' % ind, command=callback)
        register_menuitem(item.name())
    for i in range(5):
        makeitem(i)
Exemplo n.º 4
0
def demo1_createmenu():
    import mayautils
    menu = pmc.menu('DemoMenu', parent=mayautils.get_main_window_name())

    def callback(_):
        print 'Hello, reader!'

    menuitem = pmc.menuItem(parent=menu, label='Greet', command=callback)

    print repr(menuitem)
    # ui.SubMenuItem('MayaWindow|DemoMenu|menuItem254')

    return menuitem
Exemplo n.º 5
0
def demo1_createmenu():
    import mayautils
    menu = pmc.menu(
        'DemoMenu', parent=mayautils.get_main_window_name())

    def callback(_):
        print 'Hello, reader!'
    menuitem = pmc.menuItem(
        parent=menu, label='Greet', command=callback)

    print repr(menuitem)
    # ui.SubMenuItem('MayaWindow|DemoMenu|menuItem254')

    return menuitem