Package nuke :: Class EditableEnumeration_Knob
[hide private]
[frames] | no frames]

Class EditableEnumeration_Knob

 object --+                
          |                
  nuke.Knob --+            
              |            
nuke.Array_Knob --+        
                  |        
 nuke.Unsigned_Knob --+    
                      |    
  nuke.Enumeration_Knob --+
                          |
                         nuke.EditableEnumeration_Knob

Stores a single value between 0 and some maximum, and manages a set of Radio Buttons visible to the user. This is essentially an Enumeration_Knob with a different widget.

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
string
enumName(self, n)
Return name of enumeration n.
 
getDisplayStrFromID(self)
returns the display text for the associated id
int
numValues(self)
Return number of values.
None
setValue(self, item)
Set the current value.
None
setValues(self, items)
(Re)initialise knob to the supplied list of items.
String
value(self)
Current value.
List of strings
values(self)
Return list of items.

Inherited from Array_Knob: animation, animations, array, arraySize, clearAnimated, copyAnimation, copyAnimations, defaultValue, deleteAnimation, dimensions, frame, fromScript, getDerivative, getIntegral, getKeyIndex, getKeyTime, getNthDerivative, getNumKeys, getValue, getValueAt, hasExpression, height, isAnimated, isKey, isKeyAt, max, maximum, min, minimum, notDefault, removeKey, removeKeyAt, resize, setAnimated, setDefaultValue, setExpression, setKeyAt, setRange, setSingleValue, setValueAt, singleValue, splitView, toScript, unsplitView, valueAt, vect, width

Inherited from Knob: Class, clearFlag, critical, debug, enabled, error, fullyQualifiedName, getFlag, getKeyList, label, name, node, setEnabled, setFlag, setLabel, setName, setTooltip, setVisible, tooltip, visible, warning

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • name - Name.
  • label - Label.
  • items - List of strings. Example: k = nuke.Enumeration_Knob('MyEnumKnobName', 'MyEnumKnobLabel', ['label1', 'label2'])
Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

enumName(self, n)

 

Return name of enumeration n. The argument n is an integer and in the range of 0 and numValues. Deprecated.

Returns: string
Overrides: Enumeration_Knob.enumName

getDisplayStrFromID(self)

 

returns the display text for the associated id

Parameters:
  • id - the id you want to retrieve the display text for
Returns:
String containing the display text, example scene_linear (linear) Example: displayStr = knob.getDisplayStrFromID('scene_linear')
Overrides: Enumeration_Knob.getDisplayStrFromID

numValues(self)

 

Return number of values. Deprecated.

Returns: int
Overrides: Enumeration_Knob.numValues

setValue(self, item)

 

Set the current value. item will first be converted into a string and matched against the enum values. If this fails, it will attempt to be used as an index into the enum.

Parameters:
  • item - String or Integer.
Returns: None
None. Example: w = nuke.nodes.Write() k = w['file_type'] k.setValue('exr')
Overrides: Knob.setValue

setValues(self, items)

 

(Re)initialise knob to the supplied list of items.

Parameters:
  • items - The new list of values.
Returns: None
None. Example: w = nuke.nodes.Write() k = w['file_type'] k.setValues(['exr'])
Overrides: Enumeration_Knob.setValues

value(self)

 

Current value.

Parameters:
  • index - Optional index. Default is 0.
  • view - Optional view.
  • time - Optional time.
Returns: String
String. Example: w = nuke.nodes.Write() k = w['file_type'] k.value()
Overrides: Knob.value

values(self)

 

Return list of items.

Returns: List of strings
List of strings. Example: w = nuke.nodes.Write() k = w['file_type'] k.values()
Overrides: Enumeration_Knob.values