Exemplo n.º 1
0
    def __init__(self, parent=None, name=None):
        super(SolverWindow, self).__init__(parent, name=name)
        self.setupUi(self)
        self.addSubForm(solver_layout.SolverLayout)
        self.setStatusLine(const.STATUS_READY)

        # Menu Bar
        self.addMenuBarContents(self.menubar)
        self.menubar.show()

        # Standard Buttons
        self.baseHideStandardButtons()
        self.applyBtn.show()
        self.closeBtn.show()
        self.applyBtn.setText('Solve')

        self.applyBtn.clicked.connect(self.apply)

        # Hide irrelevant stuff
        self.baseHideProgressBar()

        # Callbacks
        self.callback_manager = maya_callbacks.CallbackManager()

        # Add Maya callbacks for the UI
        callback_ids = maya_callbacks.add_callbacks_new_scene(self)
        self.callback_manager.add_node_ids(
            maya_callbacks.TYPE_NEW_SCENE,
            None,
            callback_ids,
        )

        # # Update the status with the last solve result
        # self.updateStatusWithSolveResult()
        return
Exemplo n.º 2
0
 def __del__(self):
     """
     Release all resources held by the class.
     """
     callback_ids = list(self.callback_manager.get_all_ids())
     maya_callbacks.remove_callbacks(callback_ids)
     del self.callback_manager
     self.callback_manager = maya_callbacks.CallbackManager()
    def __init__(self, parent=None, *args, **kwargs):
        super(AttributeBrowserWidget, self).__init__(*args, **kwargs)

        self.ui.title_label.setText('Output Attributes')

        self.createToolButtons()
        self.createTreeView()

        self.dataChanged.connect(self.updateModel)

        self.callback_manager = maya_callbacks.CallbackManager()
        return
    def __init__(self, parent=None, *args, **kwargs):
        s = time.time()
        super(AttributeBrowserWidget, self).__init__(parent, *args, **kwargs)

        self.ui.title_label.setText('Output Attributes')

        self.createToolButtons()
        self.createTreeView()

        self.callback_manager = maya_callbacks.CallbackManager()
        e = time.time()
        LOG.debug('AttributeBrowserWidget init: %r seconds', e - s)
        return
Exemplo n.º 5
0
    def __init__(self, parent=None, name=None):
        s = time.time()
        s1 = time.time()
        super(SolverWindow, self).__init__(parent, name=name)
        self.setupUi(self)
        self.addSubForm(solver_layout.SolverLayout)
        self.setStatusLine(const.STATUS_READY)
        self._saved_ui_size = QtCore.QSize()

        # Menu Bar
        self.addMenuBarContents(self.menubar)
        self.menubar.show()

        # Standard Buttons
        self.baseHideStandardButtons()
        self.applyBtn.show()
        self.closeBtn.show()
        self.applyBtn.setText(const.WINDOW_BUTTON_SOLVE_START_LABEL)
        self.closeBtn.setText(const.WINDOW_BUTTON_CLOSE_LABEL)

        self.applyBtn.clicked.connect(self.apply)

        # Hide irrelevant stuff
        self.baseHideProgressBar()
        e1 = time.time()
        s2 = time.time()

        # Callbacks
        self.callback_manager = maya_callbacks.CallbackManager()

        # Add Maya callback to track Selection
        callback_ids = maya_callbacks.add_selection_changed_callback(self)
        self.callback_manager.add_node_ids(
            maya_callbacks.TYPE_SELECTION_CHANGED,
            None,
            callback_ids,
        )

        # Add Maya callbacks for the UI
        callback_ids = maya_callbacks.add_callbacks_new_scene(self)
        self.callback_manager.add_node_ids(
            maya_callbacks.TYPE_NEW_SCENE,
            None,
            callback_ids,
        )
        e2 = time.time()
        e = time.time()
        LOG.debug('SolverWindow init: %r seconds', e - s)
        LOG.debug('SolverWindow initA: %r seconds', e1 - s1)
        LOG.debug('SolverWindow initB: %r seconds', e2 - s2)
        return