SimpleParameter.setValue: coerce value for int parameters

This commit is contained in:
Luke Campagnola 2020-07-13 13:05:56 -07:00
parent f9327ea910
commit eb4dd5626f

View File

@ -317,6 +317,11 @@ class SimpleParameter(Parameter):
self.value = self.colorValue
self.saveState = self.saveColorState
def setValue(self, value, blockSignal=None):
if self.opts['type'] == 'int':
value = int(value)
Parameter.setValue(self, value, blockSignal)
def colorValue(self):
return fn.mkColor(Parameter.value(self))