Beispiel #1
0
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(ColorManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        marking_menu = config['MENU_MARKING_NAME']
        override_color_menu = config['MENU_MAYA_COLOR_OVERRIDE_NAME']

        # Delete UI element if they exists.
        deleteUI(override_color_menu)

        # Create the UI
        cmds.menuItem(
            override_color_menu,
            label='Maya Colors',
            insertAfter=marking_menu,
            subMenu=True,
            tearOff=True,
            parent=main_menu,
        )
        cmds.menuItem(
            label='Update',
            command=lambda *args: self.reload_settings(),
        )
        self._add_menu_items()
        cmds.menuItem(
            label='Maya Defaults',
            c=lambda *args: self.reset_settings(),
        )
Beispiel #2
0
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(LayoutManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        parent_menu = config['MENU_HOTKEY_NAME']
        layout_menu = config['MENU_LAYOUT_NAME']
        layout_reload = layout_menu + '_RELOAD'

        # Delete UI element if they exists.
        deleteUI(layout_menu)

        # Create the UI
        cmds.menuItem(layout_menu,
                      label='Layouts',
                      insertAfter=parent_menu,
                      parent=main_menu,
                      subMenu=True,
                      tearOff=True)
        cmds.menuItem(
            layout_reload,
            label='Update',
            c=lambda *args: self.reload_layouts(),
        )
        cmds.menuItem(divider=True)
        self._add_layout_item()
        cmds.menuItem(divider=True)
        cmds.menuItem(
            label='Maya Default',
            c=lambda *args: self.reset_settings(),
        )
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(MarkingMenuManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        marking_menu = config['MENU_MARKING_NAME']
        layout_menu = config['MENU_LAYOUT_NAME']

        # Delete UI elements if they exists.
        deleteUI(marking_menu)

        # Create the UI
        cmds.menuItem(
            marking_menu,
            label='Marking Menus',
            subMenu=True,
            allowOptionBoxes=True,
            insertAfter=layout_menu,
            parent=main_menu,
            tearOff=True,
        )
        cmds.menuItem(l='Update', c=lambda *args: self.reload_marking_menus())
        if self.map:
            self.add_menu_items()
        else:
            cmds.menuItem(l='No Marking Menus', enable=False)
        cmds.menuItem(l='Clean Scene', c=lambda *args: self.clean_menu())
Beispiel #4
0
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(ColorManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        marking_menu = config['MENU_MARKING_NAME']
        override_color_menu = config['MENU_MAYA_COLOR_OVERRIDE_NAME']

        # Delete UI element if they exists.
        deleteUI(override_color_menu)

        # Create the UI
        cmds.menuItem(
            override_color_menu,
            label='Maya Colors',
            insertAfter=marking_menu,
            subMenu=True,
            tearOff=True,
            parent=main_menu,
        )
        cmds.menuItem(
            label='Update',
            command=lambda *args: self.reload_settings(),
        )
        self._add_menu_items()
        cmds.menuItem(
            label='Maya Defaults',
            c=lambda *args: self.reset_settings(),
        )
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(MarkingMenuManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        marking_menu = config['MENU_MARKING_NAME']
        layout_menu = config['MENU_LAYOUT_NAME']

        # Delete UI elements if they exists.
        deleteUI(marking_menu)

        # Create the UI
        cmds.menuItem(
            marking_menu,
            label='Marking Menus',
            subMenu=True,
            allowOptionBoxes=True,
            insertAfter=layout_menu,
            parent=main_menu,
            tearOff=True,
        )
        cmds.menuItem(l='Update', c=lambda *args: self.reload_marking_menus())
        if self.map:
            self.add_menu_items()
        else:
            cmds.menuItem(l='No Marking Menus', enable=False)
        cmds.menuItem(l='Clean Scene', c=lambda *args: self.clean_menu())
Beispiel #6
0
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(SettingManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        setting_menu = config['MENU_MAYA_SETTINGS_OVERRIDE_NAME']
        color_menu = config['MENU_MAYA_COLOR_OVERRIDE_NAME']
        override_mat_menu = config['MENU_INIT_SHADER_OVERRIDE_NAME']
        reset_all = config['MENU_RESET_ALL_NAME']
        div1 = setting_menu + '_DIV1'
        div2 = setting_menu + '_DIV2'

        # Delete UI element if they exists.
        deleteUI(setting_menu, override_mat_menu, div1, div2, reset_all)

        # Create the UI
        cmds.menuItem(
            setting_menu,
            label='Maya Settings',
            insertAfter=color_menu,
            parent=main_menu,
            subMenu=True,
            tearOff=True,
        )
        cmds.menuItem(
            label='Update',
            command=lambda *args: self.reload_settings(),
        )
        self._add_menu_items()
        cmds.menuItem(
            label='Maya Defaults',
            c=lambda *args: self.reset_settings(),
        )
        cmds.menuItem(
            div1,
            divider=True,
            insertAfter=setting_menu,
            parent=main_menu
        )
        cmds.menuItem(
            override_mat_menu,
            label='Override Inital Shading',
            insertAfter=div1,
            parent=main_menu,
            checkBox=config['STATE_INIT_SHADER_OVERRIDE'],
            c=lambda *args: toggle_inital_shader_group(),
        )
        cmds.menuItem(div2, divider=True, parent=main_menu)
        cmds.menuItem(
            reset_all,
            label='Reset to factory settings',
            parent=main_menu,
            c=lambda *args: self.reset_all(),
        )
Beispiel #7
0
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(SettingManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        setting_menu = config['MENU_MAYA_SETTINGS_OVERRIDE_NAME']
        color_menu = config['MENU_MAYA_COLOR_OVERRIDE_NAME']
        override_mat_menu = config['MENU_INIT_SHADER_OVERRIDE_NAME']
        reset_all = config['MENU_RESET_ALL_NAME']
        div1 = setting_menu + '_DIV1'
        div2 = setting_menu + '_DIV2'

        # Delete UI element if they exists.
        deleteUI(setting_menu, override_mat_menu, div1, div2, reset_all)

        # Create the UI
        cmds.menuItem(
            setting_menu,
            label='Maya Settings',
            insertAfter=color_menu,
            parent=main_menu,
            subMenu=True,
            tearOff=True,
        )
        cmds.menuItem(
            label='Update',
            command=lambda *args: self.reload_settings(),
        )
        self._add_menu_items()
        cmds.menuItem(
            label='Maya Defaults',
            c=lambda *args: self.reset_settings(),
        )
        cmds.menuItem(div1,
                      divider=True,
                      insertAfter=setting_menu,
                      parent=main_menu)
        cmds.menuItem(
            override_mat_menu,
            label='Override Inital Shading',
            insertAfter=div1,
            parent=main_menu,
            checkBox=config['STATE_INIT_SHADER_OVERRIDE'],
            c=lambda *args: toggle_inital_shader_group(),
        )
        cmds.menuItem(div2, divider=True, parent=main_menu)
        cmds.menuItem(
            reset_all,
            label='Reset to factory settings',
            parent=main_menu,
            c=lambda *args: self.reset_all(),
        )
    def show(self):
        """
        Shows marking menu on hotkey press.
        """
        try:
            self.pane_widget.removeEventFilter(self.closing_event)
        except AttributeError:
            pass
        deleteUI(config['MENU_MARKING_POPUP_NAME'])

        self.build_menu()

        self.pane_widget = get_qt_object(get_parent_panel())
        self.pane_widget.installEventFilter(self.closing_event)
    def show(self):
        """
        Shows marking menu on hotkey press.
        """
        try:
            self.pane_widget.removeEventFilter(self.closing_event)
        except AttributeError:
            pass
        deleteUI(config['MENU_MARKING_POPUP_NAME'])

        self.build_menu()

        self.pane_widget = get_qt_object(get_parent_panel())
        self.pane_widget.installEventFilter(self.closing_event)
Beispiel #10
0
    def initUI(self):
        """
        Creates the user interface, can be used to update it aswell.
        """
        super(LayoutManager, self).initUI()

        # UI element names
        main_menu = config['MENU_MAIN_NAME']
        parent_menu = config['MENU_HOTKEY_NAME']
        layout_menu = config['MENU_LAYOUT_NAME']
        layout_reload = layout_menu + '_RELOAD'

        # Delete UI element if they exists.
        deleteUI(layout_menu)

        # Create the UI
        cmds.menuItem(
            layout_menu,
            label='Layouts',
            insertAfter=parent_menu,
            parent=main_menu,
            subMenu=True,
            tearOff=True
        )
        cmds.menuItem(
            layout_reload,
            label='Update',
            c=lambda *args: self.reload_layouts(),
        )
        cmds.menuItem(divider=True)
        self._add_layout_item()
        cmds.menuItem(divider=True)
        cmds.menuItem(
            label='Maya Default',
            c=lambda *args: self.reset_settings(),
        )
 def hide(self):
     try:
         self.pane_widget.removeEventFilter(self.closing_event)
     except AttributeError:
         pass
     deleteUI(config['MENU_MARKING_POPUP_NAME'])
 def clean_menu(self):
     """
     .. note:: Might be redundant.
     """
     deleteUI(config['MENU_MARKING_POPUP_NAME'])
 def hide(self):
     try:
         self.pane_widget.removeEventFilter(self.closing_event)
     except AttributeError:
         pass
     deleteUI(config['MENU_MARKING_POPUP_NAME'])
 def clean_menu(self):
     """
     .. note:: Might be redundant.
     """
     deleteUI(config['MENU_MARKING_POPUP_NAME'])