nuke.numvalue

nuke.numvalue(knob, default=infinity) → float

The numvalue function returns the current value of a knob.

This is the same as the value() command except it will always return a number. For enumerations this returns the index into the menu, starting at zero. For checkmarks this returns 0 for false and 1 for true. :param knob: A knob. :param default: Optional default value to return if the knob’s value cannot be converted to a number. :return: A numeric value for the knob, or the default value (if any).