def createTargetControls(self, box, targetPath, targetFile): # When the slider is dragged and released, an onChange event is fired # By default a slider goes from 0.0 to 1.0, and the initial position will be 0.0 unless specified # We want the slider to start from the middle targetName = os.path.splitext(targetFile)[0] modifier = humanmodifier.SimpleModifier(os.path.join(targetPath, targetFile)) self.modifiers[targetName] = modifier self.sliders.append(box.addWidget(humanmodifier.ModifierSlider(value=0, label=targetName, modifier=modifier)))
def createTargetControls(self, box, targetFile): # When the slider is dragged and released, an onChange event is fired # By default a slider goes from 0.0 to 1.0, and the initial position will be 0.0 unless specified targetFile = os.path.relpath(targetFile, self.targetsPath) modifier = humanmodifier.SimpleModifier('custom', self.targetsPath, targetFile) modifier.setHuman(self.human) self.modifiers[modifier.fullName] = modifier label = modifier.name.replace('-',' ').capitalize() self.sliders.append(box.addWidget(modifierslider.ModifierSlider(modifier=modifier, label=label)))
def createTargetControls(self, box, targetFile, facsTargetFolder, boxName): targetFile = os.path.relpath(targetFile, facsTargetFolder) facs_modifier = humanmodifier.SimpleModifier(boxName, facsTargetFolder, targetFile) facs_modifier.setHuman(self.facs_human) self.label_create = str(facs_modifier.name) self.labelSlider[self.label_create] = box.addWidget( gui.TextView("Intensity: 0%")) self.slidersValues[self.label_create] = 0 self.sliders[self.label_create] = box.addWidget( modifierslider.ModifierSlider( modifier=facs_modifier, label=self.facs_code_names[self.label_create])) # Create object for mhEvent on sliders to catch values and update labeltxt FACSslider(self.sliders[self.label_create], self.labelSlider[self.label_create], self.slidersValues, self.label_create)