Metadata
Gaffer’s UIs for plugs and nodes are defined using a metadata convention. This makes it easy to customise the UI for a specific node type, or even for a specific node instance. This document provides a reference for the most common metadata items.
General
Name |
Purpose |
Example values |
---|---|---|
|
Label used instead of plug name |
|
|
Describes the purpose of a node or plug |
|
|
Name of an image file used to represent a node |
|
|
Link to node documentation |
|
|
Overrides the default value of a plug |
|
|
Specifies a named preset value |
|
|
Enables renaming by user |
|
|
Enables deletion by user |
|
NodeEditor layout
Name |
Purpose |
Example values |
---|---|---|
|
Places a divider after the plug |
|
|
Integer index in the layout order |
|
|
Specifies the section the plug belongs in |
|
|
Specifies whether the section is collapsed |
|
|
Places widget on same line as previous widget |
|
GraphEditor layout
Name |
Purpose |
Example values |
---|---|---|
|
The colour of the plug |
|
|
The colour of input connections |
|
|
The colour of a node |
|
|
The edge the plug appears on |
|
|
Shows/hides the plug |
|
Viewer layout
Name |
Purpose |
Example values |
---|---|---|
|
Places a divider after the plug |
|
|
Integer index in the layout order |
|
|
The edge of the viewer the plug appears on |
|
PlugValueWidgets
Custom widget types may be registered for use in the Node Editor by adding plugValueWidget:type
metadata to a plug. Note that not all widget types are compatible with all plug types - the table below lists the relevant widget types by plug type.
Plug Type |
Purpose |
PlugValueWidgetType |
---|---|---|
Plug (and subclasses) |
Hide the plug permanently |
|
Plug (and subclasses) |
Display the input connection |
|
ValuePlug (and subclasses) |
Show a menu of presets |
|
IntPlug |
Display a checkbox |
|
StringPlug |
Allow multi-line text entry |
|
StringPlug |
Show a file chooser |
|
StringVectorDataPlug |
Show a file chooser |
|
These widget types may be further customised using additional metadata as follows
BoolPlugValueWidget
Name |
Purpose |
Example values |
---|---|---|
|
Change display style |
|
FileSystemPathPlugValueWidget
These options also apply to the FileSystemPathVectorDataPlugValueWidget.
Name |
Purpose |
Example values |
---|---|---|
|
Specify which bookmarks to use |
|
|
Don’t accept directories |
|
|
Only accept files that exist |
|
|
Specify valid file types |
|
|
Describe valid file types |
|
|
Display file sequences |
|
PresetsPlugValueWidget
Name |
Purpose |
Example values |
---|---|---|
|
Allow values not in preset list |
|