Welcome to nukeuuid documentation!¶
Contents:
Installation¶
To install nukeuuid
, type:
$ pip install nukeuuid
Open Nuke’s init.py
file and add:
nuke.pluginAddPath('/path/to/your/local/python/site-packages')
Getting Started¶
To get started with nukeuuid
, type in the Nuke Script Editor:
import nukeuuid
Define a dictionary of UUIDs to be set, with the keys defining the UUID name and the values defining the UUID values.
Note
The empty string as a key will evaluate to the default UUID name uuid
.
kw = {'': 'fca7201e-b53d-4918-9ab0-bb4ec5590f3c',
'utility': '5f2d525d-3e00-4bc5-88c4-794ad87f5699'}
To create and set the UUID attributes on a node (or a list of nodes), type:
nukeuuid.set_uuid(node, **kw)
To retrieve all nodes matching a specific UUID pattern, type:
kw = {'': 'fca7201e-b53d-4918-9ab0-bb4ec5590f3c',
'utility': '5f2d525d-3e00-4bc5-88c4-794ad87f5699'}
matched_nodes = nukeuuid.get_nodes(**kw)
API Documentation¶
The nukeuuid
API is very simple and consists of two main functions,
a UUID setter and a node getter.
-
nukeuuid.
set_uuid
()[source]¶ Given a list of
nodes
and a set of keyword argumentskwargs
, set UUID(s) onnodes
.Parameters: - nodes (list) – Nodes
- **kwargs – UUID dictionary
Usage:
>>> import nukeuuid >>> kw = {'': 'fca7201e-b53d-4918-9ab0-bb4ec5590f3c', 'utility': '5f2d525d-3e00-4bc5-88c4-794ad87f5699'} >>> nukeuuid.set_uuid(nuke.selectedNodes(), **kw)
-
nukeuuid.
get_nodes
()[source]¶ Given a set of keyword arguments
kwargs
, get all nodes that match the UUID pattern. RaiseNukeUUIDError
if no nodes were matched.Parameters: **kwargs – UUID dictionary Usage:
>>> import nukeuuid >>> kw = {'': 'fca7201e-b53d-4918-9ab0-bb4ec5590f3c', 'utility': '5f2d525d-3e00-4bc5-88c4-794ad87f5699'} >>> nodes = nukeuuid.get_nodes(**kw)