nuke.PanelNode

class nuke.PanelNode

Bases: object

Methods

addKnob

Add knob k to this node or panel.

createWidget

Create the widget for the panel

knobs

Get a dictionary of (name, knob) pairs for all knobs in this node.

readKnobs

Read the knobs from a string (TCL syntax).

removeKnob

Remove knob k from this node or panel.

writeKnobs

Return a tcl list.

addKnob(k) None.

Add knob k to this node or panel. :param k: Knob. :return: None.

createWidget()

Create the widget for the panel

knobs() dict

Get a dictionary of (name, knob) pairs for all knobs in this node.

For example:

>>> b = nuke.nodes.Blur()
>>> b.knobs()
Returns

Dictionary of all knobs.

Note that this doesn’t follow the links for Link_Knobs/Obsolete_Knobs

readKnobs(s) None.

Read the knobs from a string (TCL syntax). :param s: A string. :return: None.

removeKnob(k) None.

Remove knob k from this node or panel. Throws a ValueError exception if k is not found on the node. :param k: Knob. :return: None.

writeKnobs(i) String in .nk form.

Return a tcl list. If TO_SCRIPT | TO_VALUE is not on, this is a simple list of knob names. If it is on, it is an alternating list of knob names and the output of to_script().

Flags can be any of these or’d together: - nuke.TO_SCRIPT produces to_script(0) values - nuke.TO_VALUE produces to_script(context) values - nuke.WRITE_NON_DEFAULT_ONLY skips knobs with not_default() false - nuke.WRITE_USER_KNOB_DEFS writes addUserKnob commands for user knobs - nuke.WRITE_ALL writes normally invisible knobs like name, xpos, ypos

Parameters

i – The set of flags or’d together. Default is TO_SCRIPT | TO_VALUE.

Returns

String in .nk form.