Trees | Indices | Help |
|
---|
|
This module provides all the Nuke-specific functions and Classes.
|
|||
|
|
|||
AColor_Knob AColor_Knob |
|||
AnimationCurve AnimationCurve |
|||
AnimationKey A control point for an animation curve. |
|||
Array_Knob A knob which holds an array of values. |
|||
Axis_Knob A knob which descibes a 3D affine transformation, by combining rotations around each principal axis, scaling, translation, skew and a pivot point. |
|||
BBox_Knob A knob which holds a bounding box. |
|||
BackdropNode | |||
BeginTabGroup_Knob Begin a group of tabs. |
|||
Bitmask_Knob Bitmask_Knob |
|||
Boolean_Knob A knob which holds a boolean value. |
|||
Box A 2-dimensional rectangle. |
|||
Box3_Knob A 3-dimensional box. |
|||
CascadingEnumeration_Knob Stores a single value between 0 and some maximum, and manages a set of keywords visible to the user. |
|||
ChannelMask_Knob ChannelMask_Knob |
|||
Channel_Knob A knob which lets you select a layer and enable or disable individual channels. |
|||
ColorChip_Knob A knob which holds a single unsigned int that describes a user interface colour. |
|||
Color_Knob A knob which holds a color. |
|||
Double_Knob A knob which holds one or more double-precision floating point values. |
|||
EndTabGroup_Knob End a group of tabs. |
|||
Enumeration_Knob Stores a single value between 0 and some maximum, and manages a set of keywords visible to the user. |
|||
EvalString_Knob A string-valued knob which evaluates it's value as a TCL expression. |
|||
Eyedropper_Knob Eyedropper_Knob |
|||
File_Knob A knob which holds a filename. |
|||
FnPySingleton | |||
Font_Knob A knob for choosing a font. |
|||
Format A format. |
|||
Format_Knob Format_Knob |
|||
FrameRange A frame range, with an upper and lower bound and an increment. |
|||
FrameRanges A sequence of FrameRange objects with convenience functions for iterating over all frames in all ranges. |
|||
GeoSelect_Knob A knob which allows selection of parts of a 3D object. |
|||
Gizmo | |||
GlobalsEnvironment Dictionary-style object holding global Nuke state. |
|||
Group | |||
Hash A hash value for any number of objects. |
|||
Help_Knob Help_Knob |
|||
Histogram_Knob Histogram_Knob |
|||
IArray_Knob IArray_Knob |
|||
Info An info object stores x, y, w and h values. |
|||
Int_Knob A knob which holds one or more integer values. |
|||
Keyer_Knob Keyer_Knob |
|||
Knob A modifiable control that appears (unless hidden) in the panel for a node. |
|||
KnobType Constants for use in parameters which require a knob type. |
|||
Layer A layer is a set of channels. |
|||
Link_Knob Link_Knob |
|||
LinkableKnobInfo A linkable knob description. |
|||
LookupCurves_Knob Provide a set of user-editable lookup curves. |
|||
Lut Lut |
|||
Menu Menu |
|||
MenuBar MenuBar |
|||
MenuItem MenuItem |
|||
MultiView_Knob MultiView_Knob |
|||
Multiline_Eval_String_Knob A knob which evaluates it's string value as a TCL expression. |
|||
Node | |||
NodeConstructor NodeConstructor |
|||
Nodes Nodes |
|||
Obsolete_Knob For internal use only. |
|||
OneView_Knob OneView_Knob |
|||
OutputContext Describes a context in which expressions can be evaluated. |
|||
Panel Panel |
|||
PanelNode PanelNode |
|||
Password_Knob A knob which holds a password string value. |
|||
Precomp | |||
ProgressTask ProgressTask |
|||
Pulldown_Knob Pulldown_Knob |
|||
PyCustom_Knob PyCustom_Knob |
|||
PyScript_Knob PyScript_Knob(name, label=None, command=None) A button that executes a Python script. |
|||
PythonCustomKnob PythonCustomKnob |
|||
PythonKnob A string-valued knob which evaluates its value as a Python expression. |
|||
Range_Knob A knob which the minimum and maximum for a range of values. |
|||
Root | |||
RunInMainThread RunInMainThread |
|||
Scale_Knob Scale_Knob |
|||
SceneView_Knob Displays a list of items as a hierarchy. |
|||
Script_Knob A button which executes a TCL script. |
|||
String_Knob A knob which holds a string value. |
|||
Tab_Knob Groups subsequent knobs onto a tab. |
|||
Text_Knob A knob which holds a string value. |
|||
ToolBar ToolBar |
|||
Transform2d_Knob Transform2d_Knob |
|||
UV_Knob A knob which describes a texture coordinate. |
|||
Undo Undo |
|||
Unsigned_Knob A knob which holds one or more unsigned integer values. |
|||
View A named view. |
|||
ViewView_Knob ViewView_Knob |
|||
Viewer | |||
ViewerProcess ViewerProcess |
|||
ViewerWindow ViewerWindow |
|||
WH_Knob A knob which holds width and height values. |
|||
XYZ_Knob A knob which holds a 3D coordinate. |
|||
XY_Knob A knob which describes a 2D position. |
|
|||
|
|||
|
|||
ViewerWindow |
|
||
|
|||
|
|||
|
|||
|
|||
None |
|
||
None |
|
||
None |
|
||
|
|||
|
|||
|
|||
|
|||
None |
|
||
|
|||
Format or None |
|
||
|
|||
None |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
None |
|
||
|
|||
|
|||
None |
|
||
|
|||
|
|||
|
|||
|
|||
List |
|
||
None |
|
||
float |
|
||
float |
|
||
float |
|
||
tuple |
|
||
None |
|
||
None |
|
||
bool |
|
||
|
|||
|
|||
|
|||
|
|||
None |
|
||
None |
|
||
|
|||
|
|||
|
|||
int |
|
||
None |
|
||
array with x, then y |
|
||
(string) |
|
||
index |
|
||
None |
|
||
None |
|
||
Node |
|
||
bool |
|
||
Group |
|
||
None |
|
||
None |
|
||
Node |
|
||
None |
|
||
None |
|
||
None |
|
||
None |
|
||
str |
|
||
int |
|
||
None |
|
||
None |
|
||
None |
|
||
None |
|
||
|
|||
|
|||
None |
|
||
None |
|
||
None |
|
||
None |
|
||
None |
|
||
|
|||
|
|||
None |
|
||
bool |
|
||
None |
|
||
float |
|
||
float |
|
||
None |
|
||
str |
|
||
|
|||
bool |
|
||
None |
|
||
list |
|
||
Current frame |
|
||
String |
|
||
None |
|
||
list of strings or string |
|
||
int |
|
||
None |
|
||
str |
|
||
list of strings or single string |
|
||
(ranges, views) |
|
||
str |
|
||
None |
|
||
string list |
|
||
None |
|
||
Dock |
|
||
None |
|
||
None |
|
||
Menu or None |
|
||
knob |
|
||
string list |
|
||
None |
|
||
None |
|
||
str |
|
||
|
|||
int |
|
||
None |
|
||
None |
|
||
|
|||
str |
|
||
None |
|
||
string list |
|
||
None |
|
||
None |
|
||
bool |
|
||
None |
|
||
Group |
|
||
str or int |
|
||
Menu |
|
||
None |
|
||
True if modified, False otherwise |
|
||
bool |
|
||
True if any nodes were deleted, False otherwise |
|
||
Node |
|
||
None |
|
||
float |
|
||
bool |
|
||
None |
|
||
bool |
|
||
String list |
|
||
None |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
List |
|
||
|
|||
array with x, then y |
|
||
|
|||
|
|||
True if found, or False if not |
|
||
string list |
|
||
string list |
|
||
list of str |
|
||
str |
|
||
None |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
None |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
None |
|
||
None |
|
||
None |
|
||
node |
|
||
bool |
|
||
float |
|
||
None |
|
||
None |
|
||
|
|||
|
|||
|
|||
String |
|
||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
None |
|
||
|
|||
|
|||
None |
|
||
|
|||
None |
|
||
None |
|
||
Node |
|
||
List |
|
||
None |
|
||
None |
|
||
None |
|
||
None |
|
||
None |
|
||
None |
|
||
str |
|
||
None |
|
||
None |
|
||
None |
|
||
|
|||
None |
|
||
string |
|
||
|
|||
|
|||
str |
|
||
None |
|
||
Group |
|
||
Knob |
|
||
Node |
|
||
the active pane |
|
||
Node |
|
||
str |
|
||
Node |
|
||
None |
|
||
None |
|
||
ToolBar |
|
||
None |
|
||
None |
|
||
|
|||
True if on, False if off |
|
||
|
|||
string |
|
||
List |
|
||
str |
|
||
None |
|
||
float |
|
||
None |
|
|
|||
AFTER_CONST = 21
|
|||
AFTER_LINEAR = 22
|
|||
ALL = 1
|
|||
ALWAYS_SAVE = 1048576
|
|||
BEFORE_CONST = 19
|
|||
BEFORE_LINEAR = 20
|
|||
BREAK = 18
|
|||
CATMULL_ROM = 3
|
|||
CONSTANT = 1
|
|||
CUBIC = 4
|
|||
DISABLED = 128
|
|||
DONT_SAVE_TO_NODEPRESET = 549755813888
|
|||
DO_NOT_WRITE = 512
|
|||
ENDLINE = 8192
|
|||
EXE_PATH =
|
|||
EXPAND_TO_WIDTH = 68719476736
|
|||
EXPRESSIONS = 1
|
|||
FLOAT = 5
|
|||
FONT = 4
|
|||
GEO = 16
|
|||
GUI = False
|
|||
HIDDEN_INPUTS = 4
|
|||
HORIZONTAL = 17
|
|||
IMAGE = 1
|
|||
INPUTS = 2
|
|||
INT16 = 3
|
|||
INT8 = 2
|
|||
INTERACTIVE = True
|
|||
INVISIBLE = 1024
|
|||
KNOB_CHANGED_RECURSIVE = 134217728
|
|||
LINEAR = 2
|
|||
LOG = 4
|
|||
MATCH_CLASS = 0
|
|||
MATCH_COLOR = 2
|
|||
MATCH_LABEL = 1
|
|||
MONITOR = 0
|
|||
NODIR = 2
|
|||
NO_ANIMATION = 256
|
|||
NO_CHECKMARKS = 1
|
|||
NO_MULTIVIEW = 1073741824
|
|||
NO_POSTAGESTAMPS = False
|
|||
NO_UNDO = 524288
|
|||
NUKE_VERSION_DATE =
|
|||
NUKE_VERSION_MAJOR = 7
|
|||
NUKE_VERSION_MINOR = 0
|
|||
NUKE_VERSION_PHASE =
|
|||
NUKE_VERSION_PHASENUMBER = 0
|
|||
NUKE_VERSION_RELEASE = 0
|
|||
NUKE_VERSION_STRING =
|
|||
NUM_CPUS = 16
|
|||
NUM_INTERPOLATIONS = 5
|
|||
PLUGIN_EXT =
|
|||
PREPEND = 8
|
|||
PYTHON = 32
|
|||
READ_ONLY = 268435456
|
|||
REPLACE = 1
|
|||
SAVE_MENU = 33554432
|
|||
SCRIPT = 2
|
|||
SMOOTH = 0
|
|||
STARTLINE = 4096
|
|||
TABBEGINCLOSEDGROUP = 2
|
|||
TABBEGINGROUP = 1
|
|||
TABENDGROUP = -1
|
|||
TABKNOB = 0
|
|||
THREADS = 16
|
|||
TO_SCRIPT = 1
|
|||
TO_VALUE = 2
|
|||
USER_SET_SLOPE = 16
|
|||
VIEWER = 1
|
|||
WRITE_ALL = 8
|
|||
WRITE_NON_DEFAULT_ONLY = 16
|
|||
WRITE_USER_KNOB_DEFS = 4
|
|||
__package__ =
|
|||
afterBackgroundFrameRenders =
|
|||
afterBackgroundRenders =
|
|||
afterFrameRenders =
|
|||
afterRenders =
|
|||
autoSaveDeleteFilters =
|
|||
autoSaveFilters =
|
|||
autoSaveRestoreFilters =
|
|||
autolabels =
|
|||
beforeBackgroundRenders =
|
|||
beforeFrameRenders =
|
|||
beforeRenders =
|
|||
env = {'64bit': True, 'EXPERIMENTAL': True, 'ExecutablePath':
|
|||
filenameFilters =
|
|||
knobChangeds =
|
|||
nodes = <Nodes object at 0x7f9c4c0bf080>
|
|||
onCreates =
|
|||
onDestroys =
|
|||
onScriptCloses =
|
|||
onScriptLoads =
|
|||
onScriptSaves =
|
|||
onUserCreates =
|
|||
rawArgs =
|
|||
untitled =
|
|||
updateUIs =
|
|||
validateFilenames =
|
|
Nuke internal. Not for public use. |
Return an object representing the active Viewer panel. This is not the same as the Viewer node, this is the viewer UI element.
|
Add code to execute after each frame of a background render. The call must be in the form of: def foo(context): pass The context object that will be passed in is a dictionary containing the following elements: id => The identifier for the task that's making progress frame => the current frame number being rendered numFrames => the total number of frames that is being rendered frameProgress => the number of frames rendered so far. Please be aware that the current Nuke context will not make sense in the callback (e.g. nuke.thisNode will return a random node). |
Add code to execute after any background renders. The call must be in the form of: def foo(context): pass The context object that will be passed in is a dictionary containing the following elements: id => The identifier for the task that's ended Please be aware that the current Nuke context will not make sense in the callback (e.g. nuke.thisNode will return a random node). |
Add a function to modify the autosave filename before Nuke attempts delete the autosave file. Look at rollingAutoSave.py in the nukescripts directory for an example of using the auto save filters.
|
Add a function to modify the autosave filename before Nuke saves the current script on an autosave timeout. Look at rollingAutoSave.py in the nukescripts directory for an example of using the auto save filters.
|
Add a function to modify the autosave restore file before Nuke attempts to restores the autosave file. Look at rollingAutoSave.py in the nukescripts directory for an example of using the auto save filters.
|
Add code to execute on every node to produce the text to draw on it in the DAG. Any value other than None is converted to a string and used as the text. None indicates that previously-added functions should be tried |
Add code to execute before starting any background renders. The call must be in the form of: def foo(context): pass The context object that will be passed in is a dictionary containing the following elements: id => The identifier for the task that's about to begin Please be aware that the current Nuke context will not make sense in the callback (e.g. nuke.thisNode will return a random node). |
Add a path to the file choosers favorite directory list. The path name can contain environment variables which will be expanded when the user clicks the favourites button
|
Add a function to modify filenames before Nuke passes them to the operating system. The first argument to the function is the filename, and it should return the new filename. None is the same as returning the string unchanged. All added functions are called in backwards order. |
Create a new image format, which will show up on the pull-down menus for image formats. You must give a width and height and name. The xyrt rectangle describes the image area, if it is smaller than the width and height (for Academy aperture, for example). The pixel aspect is the ratio of the width of a pixel to the height.
|
Add code to execute when the user changes a knob The knob is availble in nuke.thisKnob() and the node in nuke.thisNode(). This is also called with dummy knobs when the control panel is opened or when the inputs to the node changes. The purpose is to update other knobs in the control panel. Use addUpdateUI() for changes that should happen even when the panel is closed. |
@param paths Sequence of paths to exclude Adds a list of paths that will be excluded from Node preset search paths.
|
Adds the input file extension to the list of extensions that will get displayed as sequences in the file browser.
|
@param paths Sequence of paths to exclude Adds a list of paths that will be excluded from Toolset search paths.
|
Add code to execute on every node when things change. This is done during idle, you cannot rely on it being done before it starts updating the viewer |
Add a function to validate a filename in Write nodes. The first argument is the filename and it should return a Boolean as to whether the filename is valid or not. If a callback is provided, it will control whether the Render button of Write nodes and the Execute button of WriteGeo nodes is enabled or not. |
Deprecated. Use the Root node. Adds a new view to the list of views.
|
List of all nodes in a group. If you need to get all the nodes in the script from a context which has no child nodes, for instance a control panel, use nuke.root().nodes().
|
Does operations on an animation curve. The following commands are supported:
See also: animations
|
Returns the last frame (or x value) for the currently selected animations.
|
Returns a recommended interval between samples of the currently selected animation.
|
Returns the starting frame (or x value) for the currently selected animations.
|
Returns a list of animatable things the user wants to work on. If this is a command being executed from a menu item in a curve editor, a list of the names of all selected curves is returned. If this list is empty a "No curves selected" error is produced. If this is a command being executed from the pop-up list in a knob then a list of all the fields in the knob is returned. If this is a command being executed from the right-mouse-button pop-up list in a field of a knob, the name of that field is returned. Otherwise this produces an error indicating that the command requries a knob context. You can get such a context by doing "in <knob> {command}" Also see the 'selected' argument to the animation command. See also: animation, animationStart, animationEnd, animationIncrement
|
Applies a given preset to the current node.
|
Applies a given user preset to the current node.
|
Show a Yes/No dialog.
|
Internal function. Use addAutoSaveDeleteFilter to add a callback |
Internal function. Use addAutoSaveFilter to add a callback |
Internal function. Use addAutoSaveRestoreFilter to add a callback |
Deprecated. Use Node.autoplace. Automatically place nodes, so they do not overlap.
|
Move node to the closest grid position.
|
Get the total amount of memory currently used by the cache.
|
Cancel an in-progress operation. This has the same effect as hitting cancel on the progress panel.
|
Return the center values of a group's display, these values are suitable to be passed to nuke.zoom as the DAG center point. Like so: center = nuke.center() zoom = nuke.zoom() print center[0] print center[1] ## move DAG back to center point without changing zoom. nuke.zoom( zoom, center )
|
Deprecated. Use Node.channels. List channels. The n argument is a Nuke node and if given only the channels output by this node are listed. If not given or None, all channels known about are listed.
|
Shows a dialog box with the given title and prompt text, and a combo box containing the given options.
|
Create a clone node that behaves identical to the original. The node argument is the node to be cloned, args and inpanel are optional arguments similar to createNode. A cloned node shares the exact same properties with its original. Clones share the same set of knobs and the same control panel. However they can have different positions and connections in the render tree. Any clone, including the original, can be deleted at any time without harming any of its clones.
|
This makes a clone of all selected nodes, preserving connections between them, and makes only the clones be selected.
|
Moves the currently selected nodes to a new group, maintaining their previous connections.
|
Deprecated. Use Group.connectSelectedNodes.
|
Connect a viewer input to a node. The argument i is the input number and n is either a Nuke node or None. Some viewer in the current group is found, if there are no viewers one is created. The viewer is then altered to have at least n+1 inputs and then input n is connected to the given node.This function is used by the numeric shortcuts in the DAG view menu.
|
Creates a node of the specified type and adds it to the DAG.
|
Pops up a scene browser dialog box. Receives the path to an Alembic (abc) file, and displays a hierarchical tree of the nodes within the file. The user can select which nodes they are interseted in, and nodes of the appropriate type will automatically. be created. If a valid scene file nodeName is specified, this node will be populated with the selected tree.
|
Creates a tool preset based on the currently selected nodes. @param filename: Saves the preset as a script with the given file name. @param overwrite: If 1 (true) always overwrite; if 0 (false) never overwrite; @param rootPath: If specified, use this as the root path to save the Toolset to. If not specified, save to the user's .nuke/Toolsets folder. otherwise, in GUI mode ask the user, in terminal do same as False. Default is -1, meaning 'ask the user'.
|
Puts the message into the error console, treating it like an error. Also pops up an alert dialog to the user, immediately.
|
Puts the message into the error console, treating it like a debug message, which only shows up when the verbosity level is high enough.
|
Get the path to Nukes default font.
|
Get the default node colour.
|
The named node is deleted. It can be recovered with an undo.
|
Deletes a pre-created node preset
|
Deletes a pre-created user node preset
|
Deprecated. Use the Root node. Deletes a view from the list of views.
|
List all nodes referred to by the nodes argument. 'what' is an optional integer (see below). You can use the following constants or'ed together to select the types of dependencies that are looked for: nuke.EXPRESSIONS = expressions nuke.INPUTS = visible input pipes nuke.HIDDEN_INPUTS = hidden input pipes. The default is to look for all types of connections. Example: n1 = nuke.nodes.Blur() n2 = nuke.nodes.Merge() n2.setInput(0, n1) deps = nuke.dependencies([n2], nuke.INPUTS | nuke.HIDDEN_INPUTS | nuke.EXPRESSIONS) |
List all nodes referred to by the nodes argument. 'what' is an optional integer (see below). You can use the following constants or'ed together to select what types of dependent nodes are looked for: nuke.EXPRESSIONS = expressions nuke.INPUTS = visible input pipes nuke.HIDDEN_INPUTS = hidden input pipes. The default is to look for all types of connections. evaluateAll 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: n1 = nuke.nodes.Blur() n2 = nuke.nodes.Merge() n2.setInput(0, n1) ndeps = nuke.dependentNodes(nuke.INPUTS | nuke.HIDDEN_INPUTS | nuke.EXPRESSIONS, [n1]) @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 evaluateAll: Specifies whether a full tree evaluation will take place. Defaults to True. @return: List of nodes. |
Creates a window showing the result of a python script. The script is executed in the context of the given node, so this and a knob name in expressions refer to that node. The window will have an 'update' button to run the script again.
|
Deprecated. Use Group.run, Group.begin/Group.end pairs or (preferably) the with statement. Changes the current group to the parent of the current group. Does nothing if the current group is a Root (the main window of a script).
|
Puts the message into the error console, treating it like an error.
|
execute(nameOrNode, frameRangeSet, views, continueOnError = False) -> None. Execute the named Write node over the specified frames. There are two variants of this function. The first allows you to specify the frames to write range by giving the start frame number, the end frame number and the frame increment. The second allows you to specify more complicated sets of frames by providing a sequence of FrameRange objects. If Nuke is run with the GUI up, this will pop up a progress meter. If the user hits the cancel button this command will return 'cancelled' error. If Nuke is run from the nuke command line (ie nuke was started with the -t switch) execute() prints a text percentage as it progresses. If the user types ^C it will aborting the execute() and return a 'cancelled' error.
|
Run an instance of Nuke as a monitored sub process. Returns an integer that's used as unique id for the started task. If it failed to launch this will be -1.
|
Execute the current script for a specified frame range. The argument nodes is a sequence of Nuke nodes and ranges is a sequence of range lists. A Nuke range list is a sequence of 3 integers - first, last and incr ( e.g. nuke.execute((w,), ((1,100,1),)) ). The named nodes must all be Write or other executable operators. If no nodes are given then all executable nodes in the current group are executed. Note that DiskCache and Precomp nodes do not get executed with this call, unless explicitly specified. If Nuke is run with the GUI up, this will pop up a progress meter. If the user hits the cancel button this command will raise a 'cancelled' error. If Nuke is run in terminal mode (with the -t switch) this prints a text percentage as it progresses. If the user types ^C it will abort the execute() and raise a 'cancelled' error.
|
Check for the existence of a named item. Function for backwards-compatibility with TCL.
|
Moves all nodes from the currently selected 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.
|
Parse a Nuke expression. Runs the same expression parser as is used by animations. This is not the same as the tcl expr parser. The main differences are:
|
Parse a Nuke expression. Runs the same expression parser as is used by animations. This is not the same as the tcl expr parser. The main differences are:
|
Disconnects the selected nodes in the group from the tree, and shifts them to the side.
|
Return the filename(s) this node or group is working with. For a Read or Write operator (or anything else with a filename knob) this will return the current filename, based on the root.proxy settings and which of the fullsize/proxy filenames are filled in. All expansion of commands and variables is done. However by default it will still have %%04d sequences in it, use REPLACE to get the actual filename with the current frame number. If the node is a group, a search is done for executable (i.e. Write) operators and the value from each of them is returned. This will duplicate the result of calling execute() on the group.
|
|
Force the plugin to be fully instantiated.
|
|
Return or set the current frame number. Deprecated. Use Root.frame. Returns the current frame. Normally this is the frame number set in the root node, typically by the user moving the frame slider in a viewer. If a number is given, it sets the current frame number to that number. If the current context is the root this changes the root frame.
|
Return the Node n as a string. This function is most useful when combining Python and TCL scripts for backwards compatibility reasons.
|
gets a list of all current user presets
|
Pops up a file chooser dialog box. You can use the pattern to restrict the displayed choices to matching filenames, normal Unix glob rules are used here. getClipname compresses lists of filenames that only differ by an index number into a single entry called a 'clip'.
|
Show a color chooser dialog and return the selected color as an int. The format of the color values is packed 8bit rgb multiplied by 256 (ie in hex: 0xRRGGBB00).
|
gets a list of all currently deleted presets
|
@param dir the directory to get sequences from @param splitSequences whether to split sequences or not @param extraInformation whether or not there should be extra sequence information on the sequence name @param returnDirs whether to return a list of directories as well as sequences @param returnHidden whether to return hidden files and directories. Retrieves the filename list .
|
Pops up a file chooser dialog box. You can use the pattern to restrict the displayed choices to matching filenames, normal Unix glob rules are used here.
|
Pops up a dialog with fields for a frame range and view selection.
|
Pops up a dialog box with a text field for an arbitrary string.
|
gets the class name for the currently selected node
|
Gets a list of all paths that are excluded from the search for node presets.
|
gets the node preset identifier for the currently selected node
|
Returns the first pane that contains the named panel or None if it can't be found. Note that the panelName must be exact as described in the layout.xml file or the panel ID. For example, 'Properties.1' or 'Viewer.1 or 'co.uk.thefoundry.WebBrowser'
|
gets a list of knob values for a given preset
|
gets a list of all presets for the currently selected node's class
|
Gets the presets menu for the currently selected node.
|
rief Gets the read knob for a node (if it exists).
|
Gets a list of all paths that are excluded from the search for node presets.
|
gets a list of knob values for a given preset
|
gets a list of all user presets for the currently selected node's class
|
Returns the Nuke key assignments as a string formatted for use in nuke.display().
|
Deprecated. Use Node.inputs. Get how many inputs the node has. Normally this is a constant but some nodes have a variable number, the user can keep connecting them and the count will increase. Attempting to set the number will just disconnect all inputs greater or equal to number. For a variable input node this may decrease inputs to the new value. For most nodes this will have no effect on the value of inputs.
|
Selects all unselected nodes, and deselects all selected ones.
|
rief Returns or sets the entire state of a knob. Each individual control on a control panel is called a 'knob'. A knob's name is a dot-separated list. An example of a fully-expanded name of a knob is 'root.Group1.Blur1.size.w'. 'root' is the node name of the outermost group, 'Group1' is a group inside that containing the blur operator, 'Blur1' is the name of a blur operator, 'size' is the name of the actual knob, and 'w' is the name of the 'field' (there are two fields in a blur size, 'w' and 'h'). You can omit a lot of this because all knob names are figured out relative to a 'current knob' and 'current node'. These are set depending on the context of where the scripting is invoked. For menu items the current node is the group that contained the menu, and there is no current knob. For expressions typed into knob fields the current knob is that knob and the current node is the node the knob belongs to. If a name does not start with 'root' then a search upwards is done for the first word in the name, first against the fields in the current knob, then against the knobs in the current node, then against the nodes in the group containing the current node (or in it if it is a group), on up to the root. The word 'this' means the current knob or the current node. The word 'input' means the first (0 or B) input of a node. Ie 'Blur1.input' returns the node connected to the input of Blur1, while 'Blur1.input.input' returns the input of that node. If you are getting the value for reporting to the user, you probably want to use the value or expression commands. If the getType argument is specified and is True, it will print out the type of the knob rather than getting or setting the value. The type is an integer, using the same list as addUserKnob. If the getClass argument is specified and is True, it will print out the type of the knob as a string, e.g. 'Int_Knob', 'Enumeration_Knob', 'XY_Knob'. If both the getType and getClass arguments are present and are True, getType takes precedence.
|
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")
|
Set an override for a tooltip on a knob. Example: nuke.knobTooltip('Blur.size', '[some text]') @param classknob: String in the form "class.knob" where "class" is the class of Node, i.e. Blur, and "knob" is the name of the knob. @param value: String to use as the tooltip @return: None
|
Lists the layers in a node. If no node is provided this will list all known layer names in this script.
|
Load a plugin. You can force a certain plugin to load with this function. If the plugin has already been loaded nothing happens. If there is no slash in the name then the pluginPath() is searched for it. If there is a slash then the name is used directly as a filename, if it does not start with a slash the name is relative to the directory containing any plugin being currently loaded. If no filename extension is provided, it will try appending '.so' (or whatever your OS dynamic library extension is) and finding nothing will also try to append '.tcl' and '.py'.
|
Loads the tool preset with the given file name.
|
rief Checks if localisation is enabled on a given Read_File_Knob.
|
creates localisations of all files pointed to by the given read knobs
|
Creates a new group containing copies of all the currently selected nodes. Note that this creates duplicates of the selected nodes, rather than moving them.
|
Get or set information about memory usage. The value parameter is optional and is only used by some of the commands (see below). The cmd parameter specifies what memory information to retrieve. It can be one of the following values: - info [node-name] Return a string describing current memory usage. Can optionally provide it for a specific node. - infoxml [format_bytes] [node-name] Return current memory usage as above, but in XML format. Can optionally provide if bytes should be formatted to be human readable, and also a specific node - allocator_info [format_bytes] Return current allocator usage in XML format. Can optionally provide if bytes should be formatted to be human readable - free [size] Free as much memory as possible. If a size is specified, if will stop trying to free memory when usage drops below the size. - usage Return the amount of memory currently in use. - max_usage [size] If no size is specified, returns the current size of the memory limit. If a size is given, then set this size as the memory limit. - total_ram Return the total amount of RAM. - total_vm Return the total virtual memory. - free_count [num] Get or set the free count. - new_handler_count [num] Get or set the new handler count.
|
Find and return the Menu object with the given name. Current valid menus are: 'Nuke' the application menu 'Pane' the UI Panes & Panels menu 'Nodes' the Nodes toolbar (and Nodegraph right mouse menu) 'Properties' the Properties panel right mouse menu 'Animation' the knob Animation menu and Curve Editor right mouse menu 'Viewer' the Viewer right mouse menu 'Node Graph' the Node Graph right mouse menu 'Axis' functions which appear in menus on all Axis_Knobs.
|
Show an info dialog box. Pops up an info box (with a 'i' and the text message) and waits for the user to hit the OK button.
|
Deprecated. Use Root.modified and Root.setModified. Get or set the 'modified' flag in a script. Setting the value will turn the indicator in the title bar on/off and will start or stop the autosave timeout.
|
Copy all selected nodes into a file or the clipboard.
|
Removes all selected nodes from the DAG.
|
Paste nodes from a script file or the clipboard. This function executes the script stored in a file. It is assumed the script is the result of a nodeCopy command. The 's' argument can be '%clipboard%' to paste the operating system's clipboard contents.
|
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.
|
Check whether Ocula is present.
|
Adds the ofx effect name to a list of exclusions that will not get tcl aliases automatically created for them. For example, if there is an ofx plugin with a fully qualified name of: 'OFXuk.co.thefoundry.noisetools.denoise_v100'. Nuke by default would automatically alias that so that nuke.createNode('Denoise') will create that node type. By calling nuke.ofxAddPluginAliasExclusion('OFXuk.co.thefoundry.noisetools.denoise_v100'), you'd be changing that such that the only way to create a node of that type would be to call nuke.createNode('OFXuk.co.thefoundry.noisetools.denoise_v100') This does not change saving or loading of Nuke scripts with that plugin used in any way.
|
Find all the OFX plugins (by searching all the directories below $OFX_PLUGIN_PATH, or by reading a cache file stored in $NUKE_TEMP_DIR), then add a menu item for each of them to the main menu.
|
List of all the directories Nuke searched for OFX plugins in.
|
Remove an ofx plugin alias exclusion that was previously added with . Example: nuke.ofxRemovePluginAliasExclusion('OFXuk.co.thefoundry.noisetools.denoise_v100')
|
Internal to Nuke. Not for public use. |
Return the pan values of a group's display. This function is deprecated and will be removed in a future version. You probably want to use nuke.center(). n = nuke.pan() print n[0] print n[1]
|
Adds all the paths to the beginning of the Nuke plugin path. If the path already exists in the list of plugin paths, it is moved to the start. If this command is executed inside an init.py then the init.py in the path will be executed. It also adds the paths to the sys.path, if addToSysPath is True. |
Add a filepath to the end of the Nuke plugin path. If the path already exists in the list of plugin paths, it will remain at its current position. It also appends the paths to the sys.path, if addToSysPath is True. |
This function is the same as load(), but only checks for the existence of a plugin rather than loading it. If there is no slash in the name then the pluginPath() is searched for it. If there is a slash then the name is used directly as a filename, if it does not start with a slash the name is relative to the directory containing any plugin being currently loaded. If no filename extension is provided, it will try appending '.so' (or whatever your OS dynamic library extension is) and finding nothing will also try to append '.tcl' and '.py'.
|
The system-specific locations that Nuke will look in for third-party plugins.
|
List all the directories Nuke will search in for plugins. The built-in default is ~/.nuke and the 'plugins' directory from the same location the NUKE executable file is in. Setting the environment variable $NUKE_PATH to a colon-separated list of directories will replace the ~/.nuke with your own set of directories, but the plugins directory is always on the end.
|
Returns a list of every loaded plugin or every plugin available. By default each plugin is returned as the full pathname of the plugin file. You can give a glob-style matching pattern and only the plugins whose filenames (not path) match the pattern will be returned. You can give more than one glob pattern if desired. You can also put options before the glob patterns. Currently supported: ALL Return all plugins in each of the plugin_path() directories, rather than only the currently loaded plugins. NODIR Just put the filenames in the list, not the full path. There may be duplicates. If you don't specify any switches, the default behaviour is to return a list with the full paths of all loaded plugins. @param switches: Optional parameter. Bitwise OR of nuke.ALL, nuke.NODIR. @param pattern: Zero or more glob patterns. @return: List of plugins.
|
Returns a filename from the recent-files list.
|
Perform the most recent redo.
|
Remove a directory path from the favorites list.
|
execute(nameOrNode, frameRangeSet, views, continueOnError = False) -> None. Execute the named Write node over the specified frames. There are two variants of this function. The first allows you to specify the frames to write range by giving the start frame number, the end frame number and the frame increment. The second allows you to specify more complicated sets of frames by providing a sequence of FrameRange objects. If Nuke is run with the GUI up, this will pop up a progress meter. If the user hits the cancel button this command will return 'cancelled' error. If Nuke is run from the nuke command line (ie nuke was started with the -t switch) execute() prints a text percentage as it progresses. If the user types ^C it will aborting the execute() and return a 'cancelled' error.
|
Restores a saved window layout.
|
Get the DAG's root node. Always succeeds.
|
Execute commands with a given node/knob/field as the 'context'. This means that all names are evaluated relative to this object, and commands that modify 'this' node will modify the given one.
|
Get pixel values from an image. Deprecated, use Node.sample instead. 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'.
|
Saves a node's current knob values as a user preset.
|
Saves the current window layout.
|
Clears a Nuke script and resets all the root knobs to user defined knob defaults. To reset to compiled in defaults only pass in resetToCompiledDefaults=True. |
Close the current script or group. Returns True if successful. |
Start a new script. Returns True if successful. |
Saves the current script to the current file name. If there is no current file name and Nuke is running in GUI mode, the user is asked for a name using the file chooser.
|
Saves the current script with the given file name if supplied, or (in GUI mode) asks the user for one using the file chooser. If Nuke is not running in GUI mode, you must supply a filename.
|
Select all nodes in the DAG.
|
Selects nodes according to a regular expression matching pattern, entered through an input dialog. The pattern can include wildcards ('?' and '*') as well as regular expressions. The expressions are checked against the node name, label, class, and associated file names.
|
Selects nodes that match a node in the current selection based on matchType criteria.
|
Returns the 'node the user is thinking about'. If several nodes are selected, this returns one of them. The one returned will be an 'output' node in that no other selected nodes use that node as an input. If no nodes are selected, then if the last thing typed was a hotkey this returns the node the cursor is pointing at. If none, or the last event was not a hotkey, this produces a 'No node selected' error.
|
Returns a list of all selected nodes in the current group. An attempt is made to return them in 'useful' order where inputs are done before the final node, so commands applied to this list go from top-down.
|
Create a node preset for the given node using the supplied knob values
|
Sets whether newly created presets should be added in read-only mode. Read-only presets can be applied to a node, but can't be overwritten or deleted.
|
Create a node preset for the given node using the supplied knob values
|
Opens a window for each named node, as though the user double-clicked on them. For normal operators this opens the control panel, for viewers it opens the viewer, for groups it opens the control panel.
|
Show bookmark chooser search box.
|
Show the tree view of a group node or opens a node control panel.
|
Returns a long string of debugging information about each node and the operators it is currently managing. You should not rely on its contents or format being the same in different versions of Nuke.
|
Show the settings of the current group.
|
Deprecated. Use Group.splaySelectedNodes.
|
Internal to Nuke. Not for public use. |
Strip out the frame range from a clipname, leaving a file path (still possibly with variables).
|
Close the active dock tab. Returns True if successful. |
Make the next tab in this dock active. Returns True if successful. |
Run a tcl command. The arguments must be strings and passed to the command. If no arguments are given and the command has whitespace in it then it is instead interpreted as a tcl program (this is deprecated).
|
Get the class name of the current node. This equivalent to calling nuke.thisNode().Class(), only faster.
|
Returns the current context Group node.
|
Returns the current context knob if any.
|
Return the current context node.
|
Returns the active pane. This is only valid during a pane menu callback or window layout restoration.
|
Returns the current context Node parent.
|
Get the name of the current view.
|
Search for a node in the DAG by name and return it as a Python object.
|
Toggles between windowed and fullscreen mode.
|
Toggles all the viewers on and off.
|
Find and return the ToolBar object with the given name. The name of the built-in nodes toolbar is 'Nodes'. A RuntimeException is thrown if not in GUI mode.
|
Prints the values to a stream, or to stdout by default.
|
Perform the most recent undo.
|
The value function returns the current value of a knob. The knob argument is a string referring to a knob and default is an optional default value to be returned in case of an error. Unlike knob(), this will evaluate animation at the current frame, and expand brackets and dollar signs in string knobs.
|
List of all the globally existing views.
|
Returns true if Nuke should wait for any Python threads to finish before exitting.
|
Puts the message into the error console, treating it like a warning.
|
Change the zoom and pan of a group's display. The scale argument is the new zoom factor. If the scale is given, but not the center, the zoom is set to that factor and the view is positioned so the cursor is pointing at the same place it was before zooming. A zero or negative scale value will cause a zoom-to-fit. If both scale and center arguments are given, the view is zoomed and then centered on the specified point. The new scale factor will be returned, or None if the function is run in a non-GUI context.
|
Does a zoom to fit on the selected nodes in the DAG
|
|
EXE_PATH
|
autoSaveDeleteFilters
|
autoSaveFilters
|
autoSaveRestoreFilters
|
env
|
rawArgs
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Nov 23 08:52:25 2012 | http://epydoc.sourceforge.net |