def toggleCameraClicked(self): col = lib_state.get_active_collection() if col is None: LOG.warning('No active collection to set.') return value = lib_col.get_object_toggle_camera_from_collection(col) value = not value lib_col.set_object_toggle_camera_on_collection(col, value) self.dataChanged.emit() return
def updateObjectToggleButtons(self): col = lib_state.get_active_collection() if col is None: return show_cam = lib_col.get_object_toggle_camera_from_collection(col) show_mkr = lib_col.get_object_toggle_marker_from_collection(col) show_bnd = lib_col.get_object_toggle_bundle_from_collection(col) self.objectToggleCamera_toolButton.setChecked(show_cam) self.objectToggleMarker_toolButton.setChecked(show_mkr) self.objectToggleBundle_toolButton.setChecked(show_bnd) return
def updateToggleButtons(self): is_running = mmapi.is_solver_running() if is_running is True: return col = lib_state.get_active_collection() if col is None: return show_cam = lib_col.get_object_toggle_camera_from_collection(col) show_mkr = lib_col.get_object_toggle_marker_from_collection(col) show_bnd = lib_col.get_object_toggle_bundle_from_collection(col) self.toggleCamera_toolButton.setChecked(show_cam) self.toggleMarker_toolButton.setChecked(show_mkr) self.toggleBundle_toolButton.setChecked(show_bnd) return
def populateModel(self, model, col): valid = uiutils.isValidQtObject(model) if valid is False: return mkr_list = [] show_cam = const.OBJECT_TOGGLE_CAMERA_DEFAULT_VALUE show_mkr = const.OBJECT_TOGGLE_MARKER_DEFAULT_VALUE show_bnd = const.OBJECT_TOGGLE_BUNDLE_DEFAULT_VALUE if col is not None: mkr_list = lib_marker.get_markers_from_collection(col) show_cam = lib_col.get_object_toggle_camera_from_collection(col) show_mkr = lib_col.get_object_toggle_marker_from_collection(col) show_bnd = lib_col.get_object_toggle_bundle_from_collection(col) root = convert_to_ui.markersToUINodes(mkr_list, show_cam, show_mkr, show_bnd) model.setRootNode(root) return