Entering Text

The message field in the properties panel is used to enter the text, Tcl expressions, Tcl variables, or a combination of these that you want to display in your output. For some examples of these formats, see the table below.

Text entry behaves much the same as regular text editors, but there are a few rules to observe:

The edit text control above the Viewer must be enabled if you want to type directly in the Viewer, though you can enter text in the message field at any time.

Press Return to begin a new line in both the Viewer and the message field.

Navigate around the Viewer or message field using the arrow keys.

Tcl expressions must be placed in square brackets, such as [date].

To display special Unicode characters, such as foreign language characters and copyright signs, you can:

Use HTML named entities, such as &lt; to display <, or &copy; to display ©.

Use hex entities, such as &#x3c; to display <, or &#xa9; to display ©.

Use decimal entities, such as &#60; to display <, or &#169; to display ©.

Type Unicode characters, such as < or ©, on your keyboard or cut and paste them from other applications. UTF-8 character encoding is used to store them in the control's value and in the saved Nuke script.

These special characters only work if the font you are using supports the required character.

Note:  We recommend using the above entities rather than typing <, for example. This is because future versions of the Text node may interpret HTML mark-up. In HTML, some characters, such as the greater than and less than signs, are reserved. If you used these signs within your text now, future versions could mistake them for HTML mark-up.

Example Variables and Entities

The following table gives examples of Tcl expressions, Tcl variables, HMTL named entities, hex entities, and decimal entities you can use in the message field of the Text node.

Message

Prints

Tcl expressions

[date]

Week day, day, month, hh:mm:ss, and time zone. For example, Thu Jan 15 14:22:20 GMT.

[date %a]

Abbreviated week day name. For example, Thu.

[date %A]

Full week day name. For example, Thursday.

[date %b]

Abbreviated month name. For example, Jan.

[date %B]

Full month name. For example, January.

[date %d]

Day (01-31).

[date %D]

Date (dd/mm/yy). For example, 15/01/10.

[date %H]

Hour (00-23).

[date %I]

Hour (01-12).

[date %m]

Month (01-12).

[date %M]

Minutes (00-59).

[date %p]

AM or PM.

[date %r]

Time (12-hour clock). For example, 11:04:07 AM.

[date %S]

Seconds (00-59).

[date %T]

Time (24-hour clock). For example, 14:06:54.

[date %y]

Abbreviated year (00-99). For example, 10.

[date %Y]

Full year. For example, 2010.

[date %z]

Numeric time zone. For example, -0800.

[date %Z]

Time zone. For example, GMT.

[frame]

Frame number. For example, 23.

[metadata]

List of all the keys in the incoming metadata.

[metadata values]

List all of the keys and values in the incoming metadata.

[metadata key]

Value of the key in the incoming metadata. Replace key with the name of the key whose value you want to display. For example, you may be able to use [metadata input/filename] to display the name and location of the image file, or [metadata input/ctime] to display the timestamp for an input file.

[value root.name]

Script directory path and script name. For example, Users/john/Nuke_scripts/myscript.nk.

Tcl variables

$env(ENVIRONMENT_VARIABLE)

The value of the environment variable specified. Replace ENVIRONMENT _VARIABLE with an environment variable you have set. For example, you can use $env(USER) to display the user name (for example, john) on Mac and Linux, or $env(USERNAME) to display it on Windows and Linux.

For a list of environment variables specific to Nuke, see Environment Variables.

$version_long

The full version number of Nuke. For example, 14.1v5.

$threads

Number of render threads used to calculate images. This is in addition to a main thread used to update the graphical user interface (GUI).

HTML named entities

&amp;

&

&apos;

'

&Aring;

Å

&Aacute;

Á

&Acirc;

Â

&AElig;

Æ

&Agrave;

À

&Ccedil;

Ç

&copy;

©

&eacute;

é

&ecirc;

ê

&egrave;

è

&euml;

ë

&euro;

&gt;

>

&lt;

<

&Ntilde;

Ñ

&oslash;

ø

&otilde;

õ

&Ouml;

Ö

&ouml;

ö

&quot;

"

&reg;

®

&szlig;

ß

&Uuml;

Ü

&uuml;

ü

hex entities

&#x23;

#

&#x25;

%

&#x26;

&

&#x2a;

*

&#x40;

@

&#x99;

&#x153;

œ

&#x161;

š

&#x3c;

<

&#x3e;

>

&#xa9;

©

&#xe9;

é

decimal entities

&#163;

£

&#169;

©

&#174;

®

&#191;

¿

&#234;

ê

&#223;

ß

&#224;

à

Tip:  To get a list of all the Tcl expressions you can use with date, type x on the Node Graph, set the script command dialog that opens to Tcl, enter date -h, and click OK.