nuke.knobDefault

nuke.knobDefault(classknob, value) str

Set a default value for knobs in nodes that belong to the same class. All knobs with matching names, that are created after this command was issued, will default to the new value. If class. is missing or is *.then this default applies to all nodes with such a knob. If several values are supplied, the first value which is valid will be used as the default. knobDefault can be used to specify file format specific knobs. These are knobs that are added to Read, Write and other file format dependent nodes when the file name changes. To specify defaults, use the class name, followed by the file format extension, followed by the knob name, all separated by periods. An example is shown below.

Example:

nuke.knobDefault(Blur.size, 20)

Example:

nuke.knobDefault(Read.exr.compression, 2)

Parameters:
  • classknob – String in the form class.knob where class is the class of Node, i.e. Blur, and knobis the name of the knob. This can also include a file extension, as in class.extension.knob

  • value – Optional string to convert to the default value.

Returns:

None or String with the default value.