def __init__(self): super(GradeWidget, self).__init__() self.setupUi(self) self.gainMasterHorizontalSlider.valueChanged.connect(self.on_exposure_master) self.gainMasterDoubleSpinBox.valueChanged.connect(self.on_exposure_master) commands.bind("ColouristaPanel", "global", "graph-state-change", self.set_widgets, "Docs") self.set_widgets()
def __init__(self, parent=None): super(PropertyWidget, self).__init__(parent) self.tree = QtGui.QTreeWidget() self.tree.setHeaderLabels(['Node', 'Value']) self.tree.setAlternatingRowColors(True) update_button = QtGui.QPushButton('Update') main_layout = QtGui.QVBoxLayout() main_layout.addWidget(self.tree) main_layout.addWidget(update_button) self.setLayout(main_layout) update_button.clicked.connect(self.on_update) commands.bind("PropertyWidget", "global", "graph-node-inputs-changed", self.graph_event, "Doc String") self.on_update()
def __init__(self): rvtypes.MinorMode.__init__(self) self._look_lut_path = None self._look_lut_dict = {} # Since we want the matte to stay on for all frames regardless of file type, we manage # the matte state with a global variable # since we're doing the slate management as a custom thing, we need to store whether # the slate is currently on or off, but at the beginning we assume that the slate is on self._slate_on = True self._handles_on = True self.init("Romeo Source Setup", None, [("after-session-read", self._set_display_to_no_correction, ""), ("source-group-complete", self.source_setup_romeo, "Color Management"), ("key-down--f6", self.toggle_wipes, "Over Mode and Wipes on/off")], [("Color", [("Romeo Shot LUT", self.toggle_look, "alt meta l", self.look_menu_state)])], # defines custom menu item for matte "source_setup", 1) # 1 will put this after the default "source_setup" self._logger = logging.getLogger() self._logger.addHandler(logging.StreamHandler()) self._logger.setLevel(logging.INFO) self._show_cfg = ConfigParser.ConfigParser() self._show_cfg.read(self._retrieve_cfg_path()) self._shot_regexp = re.compile(self._show_cfg.get(self._show_code, 'shot_regexp')) self._sequence_regexp = re.compile(self._show_cfg.get(self._show_code, 'sequence_regexp')) self._production_root = self._show_cfg.get('production_root', sys.platform) self._inhouse_root = self._show_cfg.get('show_root', sys.platform) self._shot_dir_format = self._show_cfg.get(self._show_code, 'shot_dir_format') self._sequence_dir_format = self._show_cfg.get(self._show_code, 'seq_dir_format') self._mainplate_regexp = re.compile(self._show_cfg.get(self._show_code, 'mainplate_regexp')) self._shot_color_dir = self._show_cfg.get(self._show_code, 'cdl_dir_format').format(pathsep = os.path.sep) # since alt-f is already bound in presentation_mode, we need to unbind it first before ours will work commands.unbind("presentation_control", "global", "key-down--alt--f") # bind other hotkeys commands.bind("default", "global", "key-down--alt--f", self.toggle_media, "Swap Shotgun Format Media") commands.bind("default", "global", "key-down--alt--s", self.toggle_slate, "Slate on/off") commands.bind("default", "global", "key-down--alt--h", self.toggle_handles, "Handles on/off")
def __init__(self): rvtypes.MinorMode.__init__(self) self.init("color-ui", None, None, [("color ui", [("color interface", self.showUi,"", None)] )] ) self.loader = QtUiTools.QUiLoader() uifile = QtCore.QFile(os.path.join(self.supportPath(colorUi, "colorUi"), "colorUiGui.ui")) uifile.open(QtCore.QFile.ReadOnly) self.widgets = self.loader.load(uifile) self.colorWheelScale = qtColorWheel.ColorWheelWidget(name='scale') self.colorWheelGamma = qtColorWheel.ColorWheelWidget(name='gamma') self.colorWheelExposure = qtColorWheel.ColorWheelWidget(name='exposure') self.colorWheelOffset = qtColorWheel.ColorWheelWidget(name='offset') self.widgets.gainWheel.takeAt(0) self.widgets.gainWheel.insertWidget(0,self.colorWheelScale) self.widgets.gammaWheel.takeAt(0) self.widgets.gammaWheel.insertWidget(0,self.colorWheelGamma) self.widgets.exposureWheel.takeAt(0) self.widgets.exposureWheel.insertWidget(0,self.colorWheelExposure) self.widgets.offsetWheel.takeAt(0) self.widgets.offsetWheel.insertWidget(0,self.colorWheelOffset) uifile.close() for w in QtGui.qApp.allWidgets(): if w.inherits("QMainWindow"): ptr = shiboken.getCppPointer(w) self.mainWindow = shiboken.wrapInstance(long(ptr[0]), QtGui.QMainWindow) self.dialog = QtGui.QDockWidget("color ui", self.mainWindow) self.mainWindow.addDockWidget(QtCore.Qt.BottomDockWidgetArea, self.dialog) self.dialog.setWidget(self.widgets) self.active = self.dialog.findChild(QtGui.QCheckBox, "active") self.invert = self.dialog.findChild(QtGui.QCheckBox, "invert") self.createNodesNuke = self.dialog.findChild(QtGui.QPushButton, "createNodesNuke") self.propagateToAllColor = self.dialog.findChild(QtGui.QPushButton, "propagateToAllColor") self.getSettingsNuke = self.dialog.findChild(QtGui.QPushButton, "getSettingsNuke") self.resetButton = self.dialog.findChild(QtGui.QPushButton, "reset") self.node = '' self.normalize = self.dialog.findChild(QtGui.QCheckBox, "normalize") self.scaleCheck = self.dialog.findChild(QtGui.QCheckBox, "gainCheckbox") self.gammaCheck = self.dialog.findChild(QtGui.QCheckBox, "gammaCheckbox") self.exposureCheck = self.dialog.findChild(QtGui.QCheckBox, "exposureCheckbox") self.offsetCheck = self.dialog.findChild(QtGui.QCheckBox, "offsetCheckbox") self.saturation = self.dialog.findChild(QtGui.QDoubleSpinBox, "saturation") self.gamma = self.findSet(QtGui.QDoubleSpinBox, ["gammaRed", "gammaGreen", "gammaBlue"]) self.scale = self.findSet(QtGui.QDoubleSpinBox, ["gainRed", "gainGreen", "gainBlue"]) self.offset = self.findSet(QtGui.QDoubleSpinBox, ["offsetRed", "offsetGreen", "offsetBlue"]) self.exposure = self.findSet(QtGui.QDoubleSpinBox, ["exposureRed", "exposureGreen", "exposureBlue"]) commands.bind("default", "global", "frame-changed", self.onFrameChangeAndAddSource, 'New frame') commands.bind("default", "global", "source-group-complete", self.onFrameChangeAndAddSource, 'New frame') #commands.bind("default", "global", "graph-state-change", self.onGraphStateChange, 'New frame') #maybe put the update in a thread to get rid of the sluggishness #connections for the wheels self.colorWheelScale.colorSignal.connect(self.changeRvColor) self.colorWheelGamma.colorSignal.connect(self.changeRvColor) self.colorWheelExposure.colorSignal.connect(self.changeRvColor) self.colorWheelOffset.colorSignal.connect(self.changeRvColor) #connections for the toggle states self.scaleCheck.stateChanged.connect(lambda: self.toggleCorrection('scale')) self.gammaCheck.stateChanged.connect(lambda: self.toggleCorrection('gamma')) self.exposureCheck.stateChanged.connect(lambda: self.toggleCorrection('exposure')) self.offsetCheck.stateChanged.connect(lambda: self.toggleCorrection('offset')) #connections to the helper functions self.createNodesNuke.clicked.connect(self.createNodesForNuke) self.propagateToAllColor.clicked.connect(self.propagateToAllRvColor) self.resetButton.clicked.connect(self.resetAllUi)