From 625ae74f820d457c3d171be2c4d4644c48c748ee Mon Sep 17 00:00:00 2001 From: David Cattermole Date: Sat, 5 Oct 2024 08:22:15 +1000 Subject: [PATCH] Solver Window - Remove unused menu code --- .../mmSolver/tools/solver/ui/solver_window.py | 148 ------------------ 1 file changed, 148 deletions(-) diff --git a/python/mmSolver/tools/solver/ui/solver_window.py b/python/mmSolver/tools/solver/ui/solver_window.py index b6645055..9ebfa5d0 100644 --- a/python/mmSolver/tools/solver/ui/solver_window.py +++ b/python/mmSolver/tools/solver/ui/solver_window.py @@ -180,83 +180,6 @@ def addMenuBarContents(self, menubar): action.triggered.connect(self.solverPrefWindowTriggeredCB) edit_menu.addAction(action) - # if Qt.IsPySide2 or Qt.IsPyQt5: - # edit_menu.addSection('Undo / Redo') - - # # Undo - # label = 'Undo last command (with disabled viewport)' - # tooltip = ( - # 'Undo the Maya scene state, without updating the viewport or solver UI' - # ) - # action = QtWidgets.QAction(label, edit_menu) - # action.setStatusTip(tooltip) - # action.triggered.connect(self.undoTriggeredCB) - # edit_menu.addAction(action) - - # # Redo - # label = 'Redo last command (with disabled viewport)' - # tooltip = ( - # 'Redo the Maya scene state, without updating the viewport or solver UI' - # ) - # action = QtWidgets.QAction(label, edit_menu) - # action.setStatusTip(tooltip) - # action.triggered.connect(self.redoTriggeredCB) - # edit_menu.addAction(action) - - # if Qt.IsPySide2 or Qt.IsPyQt5: - # edit_menu.addSection('Window Update') - - # # Auto Update Solver Validation - # label = 'Auto-Update Solver Validation' - # tooltip = 'Auto-update details of the solver parameter/error numbers.' - # value = lib_state.get_auto_update_solver_validation_state() - # action = QtWidgets.QAction(label, edit_menu) - # action.setStatusTip(tooltip) - # action.setCheckable(True) - # action.setChecked(value) - # action.toggled.connect( - # self.subForm.solver_settings.autoUpdateSolverValidationChanged - # ) - # edit_menu.addAction(action) - - # if Qt.IsPySide2 or Qt.IsPyQt5: - # edit_menu.addSection('Solver Execution') - - # # Pre-Solve Force Evaluation - # label = 'Pre-Solve Force Evaluation' - # tooltip = 'Before starting a solve, update the scene to force an evaluation.' - # pre_solve_force_eval = lib_state.get_pre_solve_force_eval_state() - # action = QtWidgets.QAction(label, edit_menu) - # action.setStatusTip(tooltip) - # action.setCheckable(True) - # action.setChecked(pre_solve_force_eval) - # action.toggled.connect(type(self).preSolveForceEvalActionToggledCB) - # edit_menu.addAction(action) - - # # Refresh Viewport During Solve - # label = 'Refresh Viewport' - # tooltip = 'Refresh the viewport while Solving.' - # refresh_value = lib_state.get_refresh_viewport_state() - # action = QtWidgets.QAction(label, edit_menu) - # action.setStatusTip(tooltip) - # action.setCheckable(True) - # action.setChecked(refresh_value) - # action.toggled.connect(type(self).refreshActionToggledCB) - # edit_menu.addAction(action) - - # # Force DG evaluation. - # label = 'Force DG Update' - # tooltip = 'Force Maya DG Evaluation while solving.' - # force_dg_update_value = lib_state.get_force_dg_update_state() - # action = QtWidgets.QAction(label, edit_menu) - # action.setStatusTip(tooltip) - # action.setCheckable(True) - # action.setChecked(force_dg_update_value) - # action.toggled.connect(type(self).forceDgUpdateActionToggledCB) - # edit_menu.addAction(action) - - # menubar.addMenu(edit_menu) - # View Menu view_menu = QtWidgets.QMenu('View', menubar) view_menu.setTearOffEnabled(True) @@ -341,45 +264,6 @@ def addMenuBarContents(self, menubar): ) view_menu.addAction(action) - if Qt.IsPySide2 or Qt.IsPyQt5: - view_menu.addSection('During Solve') - - # # Display the Image Planes while solving. - # # - # # TODO: Add other object types to show/hide while solving, - # # such as camera, nurbsCurves, nurbsSurfaces, and locators. - # label = 'Display Image Planes' - # tooltip = 'Display Image Planes while solving.' - # value = lib_state.get_display_image_plane_while_solving_state() - # action = QtWidgets.QAction(label, view_menu) - # action.setStatusTip(tooltip) - # action.setCheckable(True) - # action.setChecked(value) - # action.toggled.connect(type(self).displayImagePlaneWhileSolvingActionToggledCB) - # view_menu.addAction(action) - - # # Display the Meshes while solving. - # label = 'Display Meshes' - # tooltip = 'Display Meshes while solving.' - # value = lib_state.get_display_meshes_while_solving_state() - # action = QtWidgets.QAction(label, view_menu) - # action.setStatusTip(tooltip) - # action.setCheckable(True) - # action.setChecked(value) - # action.toggled.connect(type(self).displayMeshesWhileSolvingActionToggledCB) - # view_menu.addAction(action) - - # # Isolate Objects while solving - # label = 'Isolate Objects' - # tooltip = 'Isolate visibility of all Markers and Bundles while solving.' - # isolate_value = lib_state.get_isolate_object_while_solving_state() - # action = QtWidgets.QAction(label, view_menu) - # action.setStatusTip(tooltip) - # action.setCheckable(True) - # action.setChecked(isolate_value) - # action.toggled.connect(type(self).isolateObjectWhileSolvingActionToggledCB) - # view_menu.addAction(action) - menubar.addMenu(view_menu) # Log Menu @@ -508,38 +392,6 @@ def triggerOutputAttributesUpdate(self): self.subForm.attribute_browser.dataChanged.emit() return - # def undoTriggeredCB(self): - # LOG.debug('undoTriggeredCB') - # import mmSolver.tools.undoredoscene.tool as undoredoscene_tool - - # validation = lib_state.get_auto_update_solver_validation_state() - # with undo_utils.no_undo_context(): - # lib_state.set_auto_update_solver_validation_state(False) - # block = self.blockSignals(True) - # try: - # undoredoscene_tool.main_undo() - # finally: - # with undo_utils.no_undo_context(): - # lib_state.set_auto_update_solver_validation_state(validation) - # self.blockSignals(block) - # return - - # def redoTriggeredCB(self): - # LOG.debug('redoTriggeredCB') - # import mmSolver.tools.undoredoscene.tool as undoredoscene_tool - - # validation = lib_state.get_auto_update_solver_validation_state() - # with undo_utils.no_undo_context(): - # lib_state.set_auto_update_solver_validation_state(False) - # block = self.blockSignals(True) - # try: - # undoredoscene_tool.main_redo() - # finally: - # with undo_utils.no_undo_context(): - # lib_state.set_auto_update_solver_validation_state(validation) - # self.blockSignals(block) - # return - def solverPrefWindowTriggeredCB(self): LOG.debug('solverPrefWindowTriggeredCB') return