def __init__(self, controller, param, parent=None): PropertyWidget.__init__(self, param, parent) self.paramName = param["name"] self.controller = controller self.controller.setPropertyValue.connect(self.changed) self.controller.reset.connect(self.resetValue) self.widget = QCheckBox(self) self.widget.setTristate(False) self.default = param["value"] self.widget.setChecked(self.default) self.widget.stateChanged.connect(self.PropertyChanged) self.layout().addWidget(self.widget)
def __init__(self, controller, param, parent = None): PropertyWidget.__init__(self, param, parent) self.paramName = param["name"] self.controller = controller self.controller.setPropertyValue.connect(self.changed) self.controller.reset.connect(self.resetValue) self.widget = QCheckBox(self) self.widget.setTristate(False) self.default = param["value"] self.widget.setChecked(self.default) #self.PropertyChanged(self.default) self.widget.stateChanged.connect(self.PropertyChanged) self.layout().addWidget(self.widget)
def __init__(self, controller, params, parent=None): PropertyWidget.__init__(self, params, parent) self.paramName = params["name"] self.minVal = AI_RAY_ALL & ~( AI_RAY_SPECULAR_REFLECT | AI_RAY_DIFFUSE_REFLECT | AI_RAY_VOLUME | AI_RAY_SPECULAR_TRANSMIT | AI_RAY_DIFFUSE_TRANSMIT | AI_RAY_SHADOW | AI_RAY_CAMERA) self.controller = controller self.controller.setPropertyValue.connect(self.changed) self.controller.reset.connect(self.resetValue) self.allSwitch = QPushButton(self) self.allSwitch.setText("All Off") self.allSwitch.pressed.connect(self.switchPressed) self.switch = True self.viz = {} self.viz["primary_visibility"] = QCheckBox(self) self.viz["casts_shadows"] = QCheckBox(self) self.viz["diffuse_transmit"] = QCheckBox(self) self.viz["specular_transmit"] = QCheckBox(self) self.viz["volume"] = QCheckBox(self) self.viz["diffuse_reflect"] = QCheckBox(self) self.viz["specular_reflect"] = QCheckBox(self) self.default = params["value"] self.setViz(self.default) grid = QGridLayout() grid.addWidget(self.allSwitch, 1, 1) row = 2 for v in self.viz: label = QLabel(v) grid.addWidget(label, row, 1) grid.addWidget(self.viz[v], row, 2) self.viz[v].stateChanged.connect(self.PropertyChanged) row = row + 1 self.layout().addLayout(grid)
def __init__(self, controller, params, parent=None): PropertyWidget.__init__(self, params, parent) self.paramName = params["name"] self.minVal = AI_RAY_ALL & ~(AI_RAY_GLOSSY | AI_RAY_DIFFUSE | AI_RAY_SUBSURFACE | AI_RAY_REFRACTED | AI_RAY_REFLECTED | AI_RAY_SHADOW | AI_RAY_CAMERA) self.controller = controller self.controller.setPropertyValue.connect(self.changed) self.controller.reset.connect(self.resetValue) self.allSwitch = QPushButton(self) self.allSwitch.setText("All Off") self.allSwitch.pressed.connect(self.switchPressed) self.switch = True self.viz = {} self.viz["camera"] = QCheckBox(self) self.viz["cast_shadows"] = QCheckBox(self) self.viz["diffuse"] = QCheckBox(self) self.viz["glossy"] = QCheckBox(self) self.viz["reflection"] = QCheckBox(self) self.viz["refraction"] = QCheckBox(self) self.viz["subsurface"] = QCheckBox(self) self.default = params["value"] self.setViz(self.default) grid = QGridLayout() grid.addWidget(self.allSwitch, 1, 1) row = 2 for v in self.viz: label = QLabel(v) grid.addWidget(label, row, 1) grid.addWidget(self.viz[v], row, 2) self.viz[v].stateChanged.connect(self.PropertyChanged) row = row + 1 self.layout().addLayout(grid)
def __init__(self, controller, params, parent = None): PropertyWidget.__init__(self, params, parent) self.paramName = params["name"] self.controller = controller self.controller.setPropertyValue.connect(self.changed) self.controller.reset.connect(self.resetValue) self.allSwitch = QPushButton(self) self.allSwitch.setText("All Off") self.allSwitch.pressed.connect(self.switchPressed) self.switch = True self.viz = {} self.viz["camera"] = QCheckBox(self) self.viz["cast_shadows"] = QCheckBox(self) self.viz["diffuse"] = QCheckBox(self) self.viz["glossy"] = QCheckBox(self) self.viz["reflection"] = QCheckBox(self) self.viz["refraction"] = QCheckBox(self) self.default = params["value"] self.setViz(self.default) #self.widget.setChecked(self.default) #self.PropertyChanged(self.default) grid= QGridLayout() grid.addWidget(self.allSwitch, 1, 1) row = 2 for v in self.viz: label = QLabel(v) grid.addWidget(label, row, 1) grid.addWidget(self.viz[v], row, 2) self.viz[v].stateChanged.connect(self.PropertyChanged) row = row + 1 self.layout().addLayout(grid)
def __init__(self, controller, param, parent=None): PropertyWidget.__init__(self, param, parent) self.paramName = param["name"] self.widget = QComboBox(self) self.controller = controller self.controller.setPropertyValue.connect(self.changed) self.controller.reset.connect(self.resetValue) self.default = param["value"]["default"] self.widget.setCurrentIndex(self.default) for value in param["value"]["values"]: self.widget.addItem(value) self.widget.currentIndexChanged.connect(self.ValueChanged) self.layout().addWidget(self.widget)
def __init__(self, controller, param, parent = None): PropertyWidget.__init__(self, param, parent) self.paramName = param["name"] self.widget = QComboBox(self) self.controller = controller self.controller.setPropertyValue.connect(self.changed) self.controller.reset.connect(self.resetValue) self.default = param["value"]["default"] self.widget.setCurrentIndex(self.default) for value in param["value"]["values"]: self.widget.addItem(value) self.widget.currentIndexChanged.connect(self.ValueChanged) self.layout().addWidget(self.widget)