nuke.Gizmo

class nuke.Gizmo

Bases: Group

Methods

Class

self.Class() -> Class of node.

addCallback

self.addCallback(string, Callable) -> None Add a callback to a specific event id.

addKnob

self.addKnob(k) -> None.

allKnobs

self.allKnobs() -> list

autoplace

self.autoplace() -> None.

baseNode

self.baseNode() -> Return the 'original'(base) node if this is a clone, or this node if not cloned.

bbox

self.bbox() -> List of x, y, w, h.

begin

self.begin() -> Group.

canSetInput

self.canSetInput(i, node) -> bool Check whether the output of 'node' can be connected to input i.

channels

self.channels() -> String list.

clearCallbacks

self.clearCallbacks() -> None Remove all callbacks on the node that were previously added using self.addCallback(string, Callable).

clearCustomIcon

self.clearCustomIcon() -> None.

cloneInstanceIndex

self.cloneInstanceIndex() -> The instance index of this node where 0 is the base node, and clones begin at index 1.

cloneInstanceNode

self.cloneInstanceNode() -> The node for a valid clone instance index.

cloneInstances

self.cloneInstances() -> Return a list of all instances for this node.

clones

self.clones() -> Number of clones.

command

self.command() -> String.

connectInput

self.connectInput(i, node) -> bool Connect the output of 'node' to the i'th input or the next available unconnected input.

connectSelectedNodes

self.connectSelectedNodes(backward, inputA) -> None.

deepSample

self.deepSample(c, x, y, n) -> Floating point value.

deepSampleCount

self.deepSampleCount(x, y) -> Integer value.

dependencies

self.dependencies(what) -> List of nodes.

dependent

self.dependent(what, forceEvaluate) -> List of nodes.

end

self.end() -> None.

error

error() -> bool True if the node or any in its input tree have an error, or False otherwise.

executePythonCallback

self.executePythonCallback(string) -> None Executes the callback if one was added for the given event id string using self.addCallback(string, Callable).

expand

self.expand() -> None.

fileDependencies

self.fileDependencies(start, end) -> List of nodes and filenames.

filename

self.filename() -> String.

findNode

self.findNode(name) -> Node Find the first node who's local name matches string 'name', including any clones.

firstFrame

self.firstFrame() -> int.

forceUpdateLocalization

self.forceUpdateLocalization() -> Force Updates the localized files for this node.

forceValidate

self.forceValidate() -> None

format

self.format() -> Format.

frameRange

self.frameRange() -> FrameRange.

fullName

self.fullName() -> str Get the name of this node and any groups enclosing it in 'group.group.name' form.

getLink

self.getLink() -> Node

getNumKnobs

self.numKnobs() -> The number of knobs.

getStage

self.getStage([OutputContext], [list of additional times]) -> Runs the graph and returns the composed stage for geometry, Viewer or ScanlineRender nodes (if the latter two have geometry nodes connected, else None).

getTab

self.getTab() -> Integer value.

hasError

hasError() -> bool True if the node itself has an error, regardless of the state of the ops in its input tree, or False otherwise.

height

self.height() -> int.

help

self.help() -> str :return: Help for the node.

helpUrl

:return The current documentation help URL for the node

hideControlPanel

self.hideControlPanel() -> None :return: None

input

self.input(i) -> The i'th input.

inputs

self.inputs() -> Gets the maximum number of connected inputs.

isClone

self.isClone() -> Is this node a clone? If so use baseNode() to retrieve the 'original' node.

isCloneable

self.isCloneable() -> If the node permits cloning.

isLinked

self.isLinked() -> bool

isLocalizationOutdated

self.isLocalizationOutdated() -> Returns if there are changes detected in the source file.

isLocalized

self.isLocalized() -> returns True/False whether the node is completely localized.

isSelected

self.isSelected() -> bool

knob

self.knob(p[, follow_link]) -> The knob named p or the pth knob.

knobs

self.knobs() -> dict

lastFrame

self.lastFrame() -> int.

linkableKnobs

self.linkableKnobs(knobType) -> List

localizationProgress

self.localizationProgress() -> Checks and reports on progress of localization of the current node.

lock

self.lock() -> Sets the node to a locked state where knobs cannot be edited.

locked

self.locked() -> Returns True if the node is locked, False otherwise.

makeGroup

self.makeGroup() -> Group Creates a Group node copy of the Gizmo node.

maxInputs

self.maximumInputs() -> Maximum number of inputs this node can have.

maxOutputs

self.maximumOutputs() -> Maximum number of outputs this node can have.

maximumInputs

self.maximumInputs() -> Maximum number of inputs this node can have.

maximumOutputs

self.maximumOutputs() -> Maximum number of outputs this node can have.

metadata

self.metadata(key, time, view) -> value or dict Return the metadata item for key on this node at current output context, or at optional time and view.

minInputs

self.minimumInputs() -> Minimum number of inputs this node can have.

minimumInputs

self.minimumInputs() -> Minimum number of inputs this node can have.

name

self.name() -> str :return: Name of node.

node

self.node(s) -> Node with name s or None.

nodes

self.nodes() -> List of nodes List of nodes in group.

numKnobs

self.numKnobs() -> The number of knobs.

numNodes

self.numNodes() -> Number of nodes Number of nodes in group.

opHashes

self.opHashes() -> list of int

optionalInput

self.optionalInput() -> Number of first optional input.

output

self.output() -> Node or None.

overrideKnob

self.overrideKnob(k) -> bool

parent

self.parent() -> Return the parent group node for this node.

performanceInfo

self.performanceInfo( category ) -> Returns performance information for this node.

pixelAspect

self.pixelAspect() -> int.

proxy

self.proxy() -> bool :return: True if proxy is enabled, False otherwise.

readKnobs

self.readKnobs(s) -> None.

redraw

self.redraw() -> None.

removeCallback

self.removeCallback(string) -> None Remove a callback for a specific event id string that was previously added using self.addCallback(string, Callable).

removeKnob

self.removeKnob(k) -> None.

removeOverrideKnob

self.removeOverrideKnob(k) -> bool

resetKnobsToDefault

self.resetKnobsToDefault() -> None

rootNode

self.rootNode() -> Returns this node's root node.

run

self.run(callable) -> Result of callable.

running

self.running() -> Node rendering when paralled threads are running or None.

sample

self.sample(c, x, y, dx, dy) -> Floating point value.

screenHeight

self.screenHeight() -> int.

screenWidth

self.screenWidth() -> int.

selectOnly

self.selectOnly() -> None.

selectedNode

self.selectedNode() -> Node or None.

selectedNodes

self.selectedNodes() -> Node or None.

setCustomIcon

self.setCustomIcon(image, scale, offsetX, offsetY) -> bool.

setInput

self.setInput(i, node) -> bool Connect input i to node if canSetInput() returns true.

setName

self.setName(name, uncollide=True, updateExpressions=False) -> None Set name of the node and resolve name collisions if optional named argument 'uncollide' is True.

setSelected

self.setSelected(selected) -> None.

setTab

self.setTab(tabIndex) -> None :param tabIndex: The tab to show (first is 0).

setXYpos

self.setXYpos(x, y) -> None.

setXpos

self.setXpos(x) -> None.

setYpos

self.setYpos(y) -> None.

showControlPanel

self.showControlPanel(forceFloat = false) -> None :param forceFloat: Optional python object.

showInfo

self.showInfo(s) -> None.

shown

self.shown() -> true if the properties panel is open.

splaySelectedNodes

self.splaySelectedNodes(backward, inputA) -> None.

subgraphLocked

treeHasError

treeHasError() -> bool True if the node or any in its input tree have an error, or False otherwise.

unlink

self.unlink() -> None

unlock

self.unlock() -> Unlocks the node and makes knobs editable.

upstreamFrameRange

self.upstreamFrameRange(i) -> FrameRange Frame range for the i'th input of this node.

width

self.width() -> int.

writeKnobs

self.writeKnobs(i) -> String in .nk form.

xpos

self.xpos() -> X position of node in node graph.

ypos

self.ypos() -> Y position of node in node graph.

Class() Class of node.
Returns:

Class of node.

addCallback(string, Callable) None

Add a callback to a specific event id. Specific event ids can be found in the documentation of the related type or function. The LiveGroupNode has some examples of these event ids such as nuke.LIVEGROUP_CALLBACK_PUBLISHED. It is possible to use your own event id string and then execute the callback using self.executeCallback(string). Note that this is not related to the standard Nuke callback mechanism. :param string: the string event id to add the callback on. :param callable: callable to execute when the event is triggered. The callable should take the node as a parameter e.g. def callback(node): :return: None

addKnob(k) None.

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

allKnobs() list

Get a list of all knobs in this node, including nameless knobs.

For example:

>>> b = nuke.nodes.Blur()
>>> b.allKnobs()
Returns:

List of all knobs.

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

autoplace() None.

Automatically place nodes, so they do not overlap. :return: None.

baseNode() Return the 'original'(base) node if this is a clone, or this node if not cloned.
Returns:

A node.

bbox() List of x, y, w, h.

Bounding box of the node. :return: List of x, y, w, h.

begin() Group.

All python code that follows will be executed in the context of node. All names are evaluated relative to this object. Must be paired with end. :return: Group.

canSetInput(i, node) bool

Check whether the output of ‘node’ can be connected to input i. :param i: Input number. :param node: The node to be connected to input i. :return: True if node can be connected, False otherwise.

channels() String list.

List channels output by this node. :return: String list.

clearCallbacks() None

Remove all callbacks on the node that were previously added using self.addCallback(string, Callable). Note that this is not related to the standard Nuke callback mechanism. :return: None

clearCustomIcon() None.

Clear the custom icon set for the node. :return: None.

cloneInstanceIndex() The instance index of this node where 0 is the base node, and clones begin at index 1.

The instance index is not guaranteed to be the same between Nuke sessions. :return: Index of clone instance, or -1 if node is not cloned.

cloneInstanceNode() The node for a valid clone instance index. If index is 0 this node(the base) is returned.
Parameters:

i – Instance index.

Returns:

An instance node, or None if index is invalid for this node.

cloneInstances() Return a list of all instances for this node.
Returns:

List of nodes.

clones() Number of clones.
Returns:

Number of clones.

command() String.

Gizmo command. :return: String.

connectInput(i, node) bool

Connect the output of ‘node’ to the i’th input or the next available unconnected input. The requested input is tried first, but if it is already set then subsequent inputs are tried until an unconnected one is found, as when you drop a connection arrow onto a node in the GUI. :param i: Input number to try first. :param node: The node to connect to input i. :return: True if a connection is made, False otherwise.

connectSelectedNodes(backward, inputA) None.

Connect the selected nodes. :param backward. :param inputA. :return: None.

deepSample(c, x, y, n) Floating point value.

Return pixel values from a deep image. This requires the image to be calculated, so performance may be very bad if this is placed into an expression in a control panel. :param c: Channel name. :param x: Position to sample (X coordinate). :param y: Position to sample (Y coordinate). :param n: Sample index (between 0 and the number returned by deepSampleCount() for this pixel, or -1 for the frontmost). :return: Floating point value.

deepSampleCount(x, y) Integer value.

Return number of samples for a pixel on a deep image. This requires the image to be calculated, so performance may be very bad if this is placed into an expression in a control panel. :param x: Position to sample (X coordinate). :param y: Position to sample (Y coordinate). :return: Integer value.

dependencies(what) List of nodes.

List all nodes referred to by this node. ‘what’ is an optional integer (see below). You can use the following constants or’ed together to select what types of dependencies are looked for:

nuke.EXPRESSIONS = expressions nuke.LINKINPUTS = link knobs nuke.LINKNODE_INPUTS = link nodes nuke.INPUTS = visible input pipes nuke.HIDDEN_INPUTS = hidden input pipes.

The default is to look for all types of connections.

Example: nuke.toNode(‘Blur1’).dependencies( nuke.INPUTS | nuke.EXPRESSIONS ) :param what: Or’ed constant of nuke.EXPRESSIONS, nuke.INPUTS and nuke.HIDDEN_INPUTS to select the types of dependencies. The default is to look for all types of connections. :return: List of nodes.

dependent(what, forceEvaluate) List of nodes.
List all nodes that read information from this node. ‘what’ is an optional integer:
You can use any combination of the following constants or’ed together to select what types of dependent nodes to look for:

nuke.EXPRESSIONS = expressions nuke.LINKINPUTS = link knobs nuke.LINKNODE_INPUTS = link nodes nuke.INPUTS = visible input pipes nuke.HIDDEN_INPUTS = hidden input pipes.

The default is to look for all types of connections.

forceEvaluate is an optional boolean defaulting to True. When this parameter is true, it forces a re-evaluation of the entire tree. This can be expensive, but otherwise could give incorrect results if nodes are expression-linked.

Example: nuke.toNode(‘Blur1’).dependent( nuke.INPUTS | nuke.EXPRESSIONS ) :param what: Or’ed constant of nuke.EXPRESSIONS, nuke.INPUTS and nuke.HIDDEN_INPUTS to select the types of dependent nodes. The default is to look for all types of connections. :param forceEvaluate: Specifies whether a full tree evaluation will take place. Defaults to True. :return: List of nodes.

end() None.

All python code that follows will no longer be executed in the context of node. Must be paired with begin. :return: None.

error() bool

True if the node or any in its input tree have an error, or False otherwise.

Error state of the node and its input tree. Deprecated; use hasError or treeHasError instead. Note that this will always return false for viewers, which cannot generate their input trees. Instead, choose an input of the viewer (e.g. the active one), and call treeHasError() on that.

executePythonCallback(string) None

Executes the callback if one was added for the given event id string using self.addCallback(string, Callable). Specific event ids can be found in the documentation of the related type or function. The LiveGroupNode has some examples of these event ids such as nuke.LIVEGROUP_CALLBACK_PUBLISHED. It is possible to use your own event id string by adding a callback for it using self.addCallback(string, Callable). Note that this is not related to the standard Nuke callback mechanism. :param string: the string event id with the callback to execute. :return: None

expand() None.

Moves all nodes from the group node into its parent group, maintaining node input and output connections, and deletes the group. Returns the nodes that were moved, which will also be selected. :return: None.

fileDependencies(start, end) List of nodes and filenames.
Parameters:
  • start – first frame

  • end – last frame

Returns the list of input file dependencies for this node and all nodes upstream from this node for the given frame range. The file dependencies are calcuated by searching for Read ops or ops with a File knob. All views are considered and current proxy mode is used to decide on whether full format or proxy files are returned. Note that Write nodes files are also included but precomps, gizmos and external plugins are not. Any time shifting operation such as frameholds, timeblurs, motionblur etc are taken into consideration. :return The return list is a list of nodes and files they require. Eg. [Read1, [‘file1.dpx, file2.dpx’] ], [Read2, [‘file3.dpx’, ‘file4.dpx’] ] ]

filename() String.

Gizmo filename. :return: String.

findNode(name) Node

Find the first node who’s local name matches string ‘name’, including any clones. Assumes the string contains only the node’s local name, not the full path of the node which may contain parents or expressions.:param s: A string. :return: Node with local name matching string ‘name’, or None if not found.

firstFrame() int.

First frame in frame range for this node. :return: int.

forceUpdateLocalization() Force Updates the localized files for this node.
Returns:

None

forceValidate() None

Force the node to validate itself, updating its hash.

format() Format.

Format of the node. :return: Format.

frameRange() FrameRange.

Frame range for this node. :return: FrameRange.

fullName() str

Get the name of this node and any groups enclosing it in ‘group.group.name’ form. :return: The fully-qualified name of this node, as a string.

Returns the node that this node is linked against.

Raises:

TypeError – If the node is not a linkable node.

Returns:

Node this node is linked against, returns None if not linked.

getNumKnobs()

self.numKnobs() -> The number of knobs. :return: The number of knobs.

getStage([OutputContext][, list of additional times]) Runs the graph and returns the composed stage for geometry, Viewer or ScanlineRender nodes (if the latter two have geometry nodes connected, else None). Returns None for other node types.
getTab() Integer value.
Returns:

The index for the current active tab, or None if the node is not open in a panel.

hasError() bool

True if the node itself has an error, regardless of the state of the ops in its input tree, or False otherwise.

Error state of the node itself, regardless of the state of the ops in its input tree. Note that an error on a node may not appear if there is an error somewhere in its input tree, because it may not be possible to validate the node itself correctly in that case.

height() int.

Height of the node. :return: int.

help() str
Returns:

Help for the node.

helpUrl()

:return The current documentation help URL for the node

hideControlPanel() None
Returns:

None

input(i) The i'th input.
Parameters:

i – Input number.

Returns:

The i’th input.

inputs() Gets the maximum number of connected inputs.
Returns:

Number of the highest connected input + 1. If inputs 0, 1, and 3 are connected, this will return 4.

isClone() Is this node a clone? If so use baseNode() to retrieve the 'original' node.
Returns:

True if the node is a clone, False otherwise.

isCloneable() If the node permits cloning.
Returns:

True if the node allows cloning, False otherwise.

isLinked() bool

Return True if the node is currently linked to a node.

Raises:

TypeError – If the node is not a linkable node.

Returns:

True if linked.

isLocalizationOutdated() Returns if there are changes detected in the source file.
Returns:

true if the Localization source file has changed

isLocalized() returns True/False whether the node is completely localized.
Returns:

bool

isSelected() bool

Returns the current selection state of the node. This is the same as checking the ‘selected’ knob. :return: True if selected, or False if not.

knob(p[, follow_link]) The knob named p or the pth knob.
Parameters:
  • p – A string or an integer.

  • follow_link – Should it follow links to Link_Knob until resolution. Default is True.

Returns:

The knob named p or the pth knob.

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

lastFrame() int.

Last frame in frame range for this node. :return: int.

linkableKnobs(knobType) List

Returns a list of any knobs that may be linked to from the node as well as some meta information about the knob. This may include whether the knob is enabled and whether it should be used for absolute or relative values. Not all of these variables may make sense for all knobs.. :param knobType A KnobType describing the type of knobs you want.:return: A list of LinkableKnobInfo that may be empty .

localizationProgress() Checks and reports on progress of localization of the current node.
Returns:

float, between 0.0 (not localized) and 1.0 (localized)

lock() Sets the node to a locked state where knobs cannot be edited.
locked() Returns True if the node is locked, False otherwise.
makeGroup() Group

Creates a Group node copy of the Gizmo node. :return: Group.

maxInputs()

self.maximumInputs() -> Maximum number of inputs this node can have. :return: Maximum number of inputs this node can have.

maxOutputs()

self.maximumOutputs() -> Maximum number of outputs this node can have. :return: Maximum number of outputs this node can have.

maximumInputs() Maximum number of inputs this node can have.
Returns:

Maximum number of inputs this node can have.

maximumOutputs() Maximum number of outputs this node can have.
Returns:

Maximum number of outputs this node can have.

metadata(key, time, view) value or dict

Return the metadata item for key on this node at current output context, or at optional time and view. If key is not specified a dictionary containing all key/value pairs is returned. None is returned if key does not exist on this node. :param key: Optional name of the metadata key to retrieve. :param time: Optional time to evaluate at (default is taken from node’s current output context). :param view: Optional view to evaluate at (default is taken from node’s current output context). :return: The requested metadata value, a dictionary containing all keys if a key name is not provided, or None if the specified key is not matched.

minInputs()

self.minimumInputs() -> Minimum number of inputs this node can have. :return: Minimum number of inputs this node can have.

minimumInputs() Minimum number of inputs this node can have.
Returns:

Minimum number of inputs this node can have.

name() str
Returns:

Name of node.

node(s) Node with name s or None.

Locate a node by name. :param s: A string. :return: Node with name s or None.

nodes() List of nodes

List of nodes in group. :return: List of nodes

numKnobs() The number of knobs.
Returns:

The number of knobs.

numNodes() Number of nodes

Number of nodes in group. :return: Number of nodes

opHashes() list of int

Returns a list of hash values, one for each op in this node.

optionalInput() Number of first optional input.
Returns:

Number of first optional input.

output() Node or None.

Return output node of group. :return: Node or None.

overrideKnob(k) bool

Override knob k on this link node.

Parameters:

k – Knob to override.

Raises:
  • TypeError – If the node is not a linkable node.

  • RuntimeError – If not linked.

Returns:

True if knob successfully overridden.

parent() Return the parent group node for this node.
performanceInfo(category) Returns performance information for this node. Performance timing must be enabled.

@category: performance category ( optional ).A performance category, must be either nuke.PROFILE_STORE, nuke.PROFILE_VALIDATE, nuke.PROFILE_REQUEST or nuke.PROFILE_ENGINE The default is nuke.PROFILE_ENGINE which gives the performance info of the render engine. :return: A dictionary containing the cumulative performance info for this category, where: callCount = the number of calls made timeTakenCPU = the CPU time spent in microseconds timeTakenWall = the actual time ( wall time ) spent in microseconds

pixelAspect() int.

Pixel Aspect ratio of the node. :return: float.

proxy() bool
Returns:

True if proxy is enabled, False otherwise.

readKnobs(s) None.

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

redraw() None.

Force a redraw of the node. :return: None.

removeCallback(string) None

Remove a callback for a specific event id string that was previously added using self.addCallback(string, Callable). Note that this is not related to the standard Nuke callback mechanism. :param string: the string event id with the callback to remove. :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.

removeOverrideKnob(k) bool

Remove override from knob k on this link node.

Parameters:

k – Knob to remove override from.

Raises:
  • TypeError – If the node is not a linkable node.

  • RuntimeError – If not linked.

Returns:

True if override removed successfully.

resetKnobsToDefault() None

Reset all the knobs to their default values.

rootNode() Returns this node's root node. This may differ from nuke.root() for example if the read node was created importing footage to the timeline.
run(callable) Result of callable.

Execute in the context of node. All names are evaluated relative to this object. :param callable: callable to execute. :return: Result of callable.

classmethod running() Node rendering when paralled threads are running or None.

Class method. :return: Node rendering when paralled threads are running or None.

sample(c, x, y, dx, dy) Floating point value.

Return pixel values from an image. This requires the image to be calculated, so performance may be very bad if this is placed into an expression in a control panel. Produces a cubic filtered result. Any sizes less than 1, including 0, produce the same filtered result, this is correct based on sampling theory. Note that integers are at the corners of pixels, to center on a pixel add .5 to both coordinates. If the optional dx,dy are not given then the exact value of the square pixel that x,y lands in is returned. This is also called ‘impulse filtering’. :param c: Channel name. :param x: Centre of the area to sample (X coordinate). :param y: Centre of the area to sample (Y coordinate). :param dx: Optional size of the area to sample (X coordinate). :param dy: Optional size of the area to sample (Y coordinate). :param frame: Optional frame to sample the node at. :return: Floating point value.

screenHeight() int.

Height of the node when displayed on screen in the DAG, at 1:1 zoom, in pixels. :return: int.

screenWidth() int.

Width of the node when displayed on screen in the DAG, at 1:1 zoom, in pixels. :return: int.

selectOnly() None.

Set this node to be the only selection, as if it had been clicked in the DAG. :return: None.

selectedNode() Node or None.

Returns the node the user is most likely thinking about. This is the last node the user clicked on, if it is selected. Otherwise it is an ‘output’ (one with no selected outputs) of the set of selected nodes. If no nodes are selected then None is returned. :return: Node or None.

selectedNodes() Node or None.

Selected nodes. :return: Node or None.

setCustomIcon(image, scale, offsetX, offsetY) bool.

Set a custom icon for the node. :param image: filepath to image to be used as an icon. :param scale: Optional. scale factor for the icon. :param offsetX: Optional. offset the icon in the x axis from the top left corner of the node. :param offsetY: Optional. offset the icon in the y axis from the top left corner of the node. :return: True if icon has been set, else false.

setInput(i, node) bool

Connect input i to node if canSetInput() returns true. :param i: Input number. :param node: The node to connect to input i. :return: True if canSetInput() returns true, or if the input is already correct.

setName(name, uncollide=True, updateExpressions=False) None

Set name of the node and resolve name collisions if optional named argument ‘uncollide’ is True. :param name: A string. :param uncollide: Optional boolean to resolve name collisions. Defaults to True. :param updateExpressions: Optional boolean to update expressions in other nodes to point at the new name. Defaults to False. :return: None

setSelected(selected) None.

Set the selection state of the node. This is the same as changing the ‘selected’ knob. :param selected: New selection state - True or False. :return: None.

setTab(tabIndex) None
Parameters:

tabIndex – The tab to show (first is 0).

Returns:

None

setXYpos(x, y) None.

Set the (x, y) position of node in node graph. :param x: The x position of node in node graph. :param y: The y position of node in node graph. :return: None.

setXpos(x) None.

Set the x position of node in node graph. :param x: The x position of node in node graph. :return: None.

setYpos(y) None.

Set the y position of node in node graph. :param y: The y position of node in node graph. :return: None.

showControlPanel(forceFloat=false) None
Parameters:

forceFloat – Optional python object. If it evaluates to True the control panel will always open as a floating panel. Default is False.

Returns:

None

showInfo(s) None.

Creates a dialog box showing the result of script s. :param s: A string. :return: None.

shown() true if the properties panel is open. This can be used to skip updates that are not visible to the user.
Returns:

true if the properties panel is open. This can be used to skip updates that are not visible to the user.

splaySelectedNodes(backward, inputA) None.

Splay the selected nodes. :param backward. :param inputA. :return: None.

treeHasError() bool

True if the node or any in its input tree have an error, or False otherwise.

Error state of the node and its input tree. Note that this will always return false for viewers, which cannot generate their input trees. Instead, choose an input of the viewer (e.g. the active one), and call treeHasError() on that.

Unlink the node without possibility to resolve.

Raises:

TypeError – If the node is not a linkable node.

unlock() Unlocks the node and makes knobs editable.
upstreamFrameRange(i) FrameRange

Frame range for the i’th input of this node. :param i: Input number. :return: FrameRange. Returns None when querying an invalid input.

width() int.

Width of the node. :return: int.

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.

xpos() X position of node in node graph.
Returns:

X position of node in node graph.

ypos() Y position of node in node graph.
Returns:

Y position of node in node graph.