Exemplo n.º 1
0
    def show_in_shelf_editor(self, button):
        """
        Open the shelf editor, and view the script for the shelf button with the given name.
        """
        # The shelf editor only works on the currently-selected shelf.
        if not self.select_shelf():
            return

        wnd = shelfEditorWindow()
        wnd.create(button, 2)
Exemplo n.º 2
0
    def show_in_shelf_editor(self, button):
        """
        Open the shelf editor, and view the script for the shelf button with the given name.
        """
        # The shelf editor only works on the currently-selected shelf.
        pm.tabLayout(gShelfTopLevel,
                     edit=True,
                     selectTabIndex=self.shelf_idx + 1)

        wnd = shelfEditorWindow()
        wnd.create(button, 2)
Exemplo n.º 3
0
    def show_popup_in_shelf_editor(self, button, popup):
        """
        Open the shelf editor, and view the script for a popup in a shelf button.
        """
        pm.tabLayout(gShelfTopLevel,
                     edit=True,
                     selectTabIndex=self.shelf_idx + 1)

        wnd = shelfEditorWindow()
        wnd.create(button, 4)

        # Find the index of the popup.
        popup_names = wnd.updateMenuItemList()
        idx = popup_names.index(popup)
        if idx != -1:
            wnd.updateMenuItemList(idx + 1)
Exemplo n.º 4
0
    def show_popup_in_shelf_editor(self, button, popup):
        """
        Open the shelf editor, and view the script for a popup in a shelf button.
        """
        # The shelf being edited needs to be selected in the shelf.
        if not self.select_shelf():
            return

        wnd = shelfEditorWindow()
        wnd.create(button, 4)

        # Find the index of the popup.
        popup_names = wnd.updateMenuItemList()
        popup_name = popup.split('|')[-1]
        try:
            idx = popup_names.index(popup_name)
        except ValueError:
            return

        wnd.updateMenuItemList(idx + 1)