def look_menu_state(self): """ Returns the menu state of the Technicolor LUT menu item. """ # since the CDL should be enabled or disabled for a single # source rather than on the session as a whole, reference the # currently viewed node to toggle look_node = self._get_node_for_source("RVLookLUT") look_on = commands.getIntProperty("%s.lut.active" % look_node)[0] if look_on: return commands.CheckedMenuState return commands.UncheckedMenuState
def toggle_look(self, event): """ If the LookLUT is currently on, turn it off, and vice versa. Display feedback so the user knows what's happening. """ # since the CDL should be enabled or disabled for a single # source rather than on the session as a whole, reference the # currently viewed node to toggle look_node = self._get_node_for_source("RVLookLUT") look_on = commands.getIntProperty("%s.lut.active" % look_node)[0] if look_on: commands.setIntProperty("%s.lut.active" % look_node, [0], True) extra_commands.displayFeedback("Romeo Shot LUT is OFF", 5.0) else: commands.setIntProperty("%s.lut.active" % look_node, [1], True) extra_commands.displayFeedback("Romeo Shot LUT is ON", 5.0)
def onFrameChangeAndAddSource(self, event): ''' do the main updates in here first update the gui with the current settings from the RVColor Node then connect to the gui change events update procedures on the RVColor Node ''' node = self.getCurrentColorNode() if node == self.node: return #we do not have to run updates if we are still on the same color node as all connections are set else: self.node=node ##this seems to not be working as the color active is not a per node setting ?! need to ask support if int(commands.getIntProperty("%s.color.active" % self.node,0,2500)[0]) == int(1): self.active.setCheckState(QtCore.Qt.Checked) else: self.active.setCheckState(QtCore.Qt.Unchecked) self.updateSpinBoxes('scale', [x for x in commands.getFloatProperty("%s.color.scale" % self.node,0,2500)]) self.updateSpinBoxes('gamma', [x for x in commands.getFloatProperty("%s.color.gamma" % self.node,0,2500)]) self.updateSpinBoxes('exposure', [x for x in commands.getFloatProperty("%s.color.exposure" % self.node,0,2500)]) self.updateSpinBoxes('offset', [x for x in commands.getFloatProperty("%s.color.offset" % self.node,0,2500)]) self.updateSpinBoxes('saturation', [x for x in commands.getFloatProperty("%s.color.saturation" % self.node,0,2500)]) self.active.released.connect(self.checkBoxPressed(self.active, "%s.color.active" % self.node)) self.invert.released.connect(self.checkBoxPressed(self.invert, "%s.color.invert" % self.node)) for gamma in self.gamma: gamma.valueChanged.connect(lambda: self.changeRvColorFromSpinBox("gamma")) for scale in self.scale: scale.valueChanged.connect(lambda: self.changeRvColorFromSpinBox("scale")) for offset in self.offset: offset.valueChanged.connect(lambda: self.changeRvColorFromSpinBox("offset")) for exp in self.exposure: exp.valueChanged.connect(lambda: self.changeRvColorFromSpinBox("exposure")) self.saturation.valueChanged.connect(self.changeSat)