Inherits DD::Image::Description.
Public Member Functions | |
Op * | constructor (Node *node) const |
< Nuke calls this to create an instance. | |
Description (const char *n, OpConstructor c, License *l=nullptr) | |
Description (const char *n, OpConstructor c, NodeBuilder nodeBuilder) | |
Description (const char *n, const char *, OpConstructor c) | |
Description (const char *n, const char *, IopConstructor c) | |
Static Public Member Functions | |
static const Description * | find (int i) |
Public Attributes | |
const char * | name |
Nuke command. | |
Public Attributes inherited from DD::Image::Description | |
const char * | compiled |
const char * | plugin |
License * | license |
Protected Types | |
typedef Op *(* | OpConstructor) (Node *) |
typedef Iop *(* | IopConstructor) (Node *) |
Static Protected Member Functions | |
static void | add (DD::Image::Description *) |
Protected Attributes | |
OpConstructor | constructor_ |
Static Protected Attributes | |
static const Description * | current_ |
Additional Inherited Members | |
Public Types inherited from DD::Image::Description | |
typedef Node *(* | NodeBuilder) (void *) |
typedef std::vector< Description * > | DescriptionList |
Protected Member Functions inherited from DD::Image::Description | |
void | ctor (void(*f)(Description *)) |
void | ctor (void(*f)(Description *), NodeBuilder nodeBuilder) |
A subclass of Op that wants to appear on Nuke's menu or be created by a Nuke script command must create one or more static instances of this structure. The constructor adds itself to a list which Nuke scans to find all the possible operators.
The code that goes into a plugin to create the entry looks like this:
It is required that the string inside the description and returned by Op::Class() be the exact same pointer. This is checked by Nuke. It is also required that this string is the same as base name of the plugin file, or the name of a .tcl file that says "load foo" where foo is the name of this plugin file. Nuke only stores the name in the saved script, so this is necessary for it to find the plugin again.
|
inline |
The constructor adds this Op to the internal table of available script commands.
If the License is not null then it is tested and if the test fails the description is not added to the table, making it impossible to call the constructor. You should check the license pointer when your constructor is called to make sure some cracker has not changed it or cleared it.
|
inline |
For back compatibility with Nuke4.0 plugins, this takes an extra "menu" argument which is ignored (menu entries are all set by tcl commands now).
|
inline |
For back compatibility with Nuke4.0 plugins, this takes an extra "menu" argument which is ignored (menu entries are all set by tcl commands now).
|
staticprotected |
Internals of the constructor, adds the description to the internal array and calls add_callback.
|
static |
Return the i'th Op::Description known about, or return a null pointer for the last one. This does not load any plugins, it only returns the ones that have been loaded so far.
©2024 The Foundry Visionmongers, Ltd. All Rights Reserved. |