EXPRESSIONS & TCL Tips
This is a collection of different Expression and TCL snippets ( and some python and HTML).
I picked these from various sites, among from pages of talented TDs websites ( of which I provide a list of a few at the bottom of this page ). As it's said it is not a site explaining the Expression node, which if you're interested in I recommend you the Expressions 101 by Matt Estela and Pedro Andrade.
​
Feel free to use and share!
So what is Expression in Nuke anyway?
- Basically, programmatic commands that you can apply as parameters in Nuke.
What is TCL?
- Tcl or Tool Command Language (pronounced as `Tickle`) is a high-level, general-purpose, dynamic programming language. ( for more info here`s a Wikipedia link )
How to apply them?
- There are multiple ways, depends on what kind of expressions you want to use and for what purpose.
I recommend a few useful links from the Foundry`s website before you start to experiment with the snippets I collected:
​
Expressions on Transform
So let`s start applying some expressions!
I use a `Transform` node to show the result of the first snippets but the values it produces are the same in any node where you can add expression as the knob`s value.
And the first one should look like this:
​
![001.jpg](https://static.wixstatic.com/media/1e0ac4_e21897d5bdc540998cdd5b733d05e7d7~mv2.jpg/v1/fill/w_562,h_269,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/001.jpg)
( You can double click on the videos to make full screen )
​
## Adding frame number as a value
x: frame OR t OR x
y: frame OR t OR x​
## Adding random number as a value ( the 'random()' generates numbers between 0 and 1 )
x: random()
y: random()
## To increase the amount of movement let's
multiply the value
x: random()*100
y: random()*100
## Adding sinus to an equation.
x: sin (frame)*100
y: sin (frame)*100
##Slow down with dividing the frame number
​
x: sin (frame/10)*100
y: sin (frame/10)*100
x: sin(frame/10)*500
rotate: sin(frame/10)*100
x: sin(frame/10)*500
rotate: cos(frame/10)*100
x: sin(frame/10)*500
rotate: cos(sin(frame/10))*100
## Movement in a circle clockwise
x: sin(frame/5)*100
y: cos(frame/5)*100
## Movement in a circle counterclockwise
​
x: cos(frame/5)*100
y: sin(frame/5)*100
Displaying knob value
![002.jpg](https://static.wixstatic.com/media/1e0ac4_d7b0e1502a174a12820ba9946b284a04~mv2.jpg/v1/fill/w_75,h_45,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/002.jpg)
size: [value size]
​
![003.jpg](https://static.wixstatic.com/media/1e0ac4_09ae826a531b44f4b8cb6eba3195c705~mv2.jpg/v1/fill/w_75,h_45,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/003.jpg)
A channels: [value Achannels]
B channels: [value Bchannels]
![004.jpg](https://static.wixstatic.com/media/1e0ac4_be406b55266343e0a0a358ef0b5dfe47~mv2.jpg/v1/fill/w_75,h_45,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/004.jpg)
Range: [value range]
Range A: [value range.A]
Range B: [value range.B]
![005.jpg](https://static.wixstatic.com/media/1e0ac4_700d22f39eaf4455b4d3fa44817b7cc5~mv2.jpg/v1/fill/w_75,h_46,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/005.jpg)
Mode: [value mode]
RGB: [value red], [value green], [value blue]
![006.jpg](https://static.wixstatic.com/media/1e0ac4_b6587f7ad1134e739fe3e578ff516fbd~mv2.jpg/v1/fill/w_75,h_45,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/006.jpg)
Gain: [value white]
![007.jpg](https://static.wixstatic.com/media/1e0ac4_e3aa42cbfd914e589964fd3126776f0a~mv2.jpg/v1/fill/w_75,h_46,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/007.jpg)
[value first_frame] - [value last_frame]
​
Format expressions
## Using the input format values
x: input.format.x
​
y: input.format.y
​
r: input.format.r OR input.width OR input.w
​
t: input.format.t OR input.height OR input.h
## Using the input format in Reformat node. ( Only works if connected node has format information like Read node )
input.format
## Using the root values ( root values are the ones in the Project Settings which you see on the Properties if you press S on the Node Graph )
x: root.format.x
​
y: root.format.y
​
r: root.format.r OR root.width OR root.w
​
t: root.format.t OR root.height OR root.h
## Using a root value in a Reformat node.
root.format
## Using the bounding box values
x: bbox.x
​
y: bbox.y
​
r: bbox.r OR bbox.width
​
t: bbox.t OR bbox.height
Frame expressions
## To return current frame value
frame OR t OR x
## Using range values from input.
input.first_frame
input.last_frame
## Using range values from root.
root.first_frame
root.last_frame
Useful Conditional expressions
## If frame number is lower than 1010 value is 0 else 100.
frame < 1010 ? 0 : 100
## If 'Transform1' translate.x value is 100 the value is 500 else 0
[if {[value Transform1.translate.x]==100} {return "500"} {return "0"}]
## If frame number is 100 the value is 500 else 0
[if {[frame]==100} {return "500"} {return "0"}]
## If knob 'test' is '0' return "hi" else "bye" - with TCL
[if {[numvalue parent.test] == 0} {return "hi"} else {return "bye"}]
[python -eval {"hi" if nuke.thisParent()['test'].array()[0] else "bye"}]
## If Text1 node's 'message knob has "Notes:" feature the note else leave empty.
[python -eval {nuke.toNode("Text1")["message"].value().split("Notes:")[1].split("\n")[0] if "Notes:" in nuke.toNode("Text1")["message"].value() else "" }]
Conditional expressions for 'disable' knob
## If frame number is greater than 1010 value is 1 ( = node is disabled )
frame > 1010
## Between frame 1010 and 1015 value is 1 ( = node is disabled )
inrange (frame, 1010, 1015)
## You can also add multiple ranges
( formula: inrange (frame, start, end, start, end, start, end) )
inrange (frame, 1010, 1015, 1025, 1035)
## Gui ( Graphic User Interface ) returns 1 ( = node is disabled ) when Nuke is running. It works well on heavy nodes when you run your render on a renderfarm.
$gui
## When the script is in use returns 1 else 12.
$gui ? 1 : 12
TIP: You can use $gui in a Switch node putting heavy nodes like Defocus on input 1 and Blur can be used while working on input 0.
For more about $gui click here.
## True if the name item exists. ( Useful for gizmos with mask input )
![exists parent.input1]
You can find more conditional TCL functions here.
Changing knob values
![008.jpg](https://static.wixstatic.com/media/1e0ac4_e0a1cce3ad6f4292a4d4c39f721828a9~mv2.jpg/v1/fill/w_108,h_39,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/008.jpg)
[knob Blur15.size 200]
After you call a knob function you need to define the node`s then the knob`s name before you give a new value to it.
![009.jpg](https://static.wixstatic.com/media/1e0ac4_c813d489af0140d686bfc2308cd4d60c~mv2.jpg/v1/fill/w_108,h_39,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/009.jpg)
[knob Blur13.size Blur_CONTROL_2.size*3]
[knob Blur13.channels rgb]
[knob Blur13.mix .8]
You can also define multiple values from one node and can use expressions as value.
![010.jpg](https://static.wixstatic.com/media/1e0ac4_3045e5d8b56e4de78c932c3d0efa882b~mv2.jpg/v1/fill/w_108,h_39,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/010.jpg)
[knob rotate frame]
You can also add expression as a value like frame here that returns the
current frame number.
## Setting keyframe value with setkey
[setkey this.size 34 2]
If you want to set a keyframe in a different node use the node`s name instead of this.
After defining the knob the first number is the frame number the second is the value.
Displaying input's name
![011.jpg](https://static.wixstatic.com/media/1e0ac4_042c90a60e624b2d87fe976e2fe8ef64~mv2.jpg/v1/fill/w_95,h_42,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/011.jpg)
## Showing single input
​
Input: [value input.name]
![012.jpg](https://static.wixstatic.com/media/1e0ac4_ac04c42ab3464ce6b5717250df19f2bc~mv2.jpg/v1/fill/w_95,h_42,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/012.jpg)
## Showing multiple inputs using input's
Input B: [value input0.name]
Input A: [value input1.name]
![013.jpg](https://static.wixstatic.com/media/1e0ac4_e6a720ebfc7e49c895a34142a6e051ad~mv2.jpg/v1/fill/w_95,h_42,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/013.jpg)
## Showing all inputs with python
[python {"\n".join(["Input: %s" % node.name() for node in nuke.thisNode().dependencies()])}]
Displaying pixel value
![014.jpg](https://static.wixstatic.com/media/1e0ac4_5eab2775aa934f418fba98175bd768fc~mv2.jpg/v1/fill/w_135,h_46,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/014.jpg)
# In the ColorWheel
​
R: [sample [node ColorWheel5] red 1075 378]
G: [sample [node ColorWheel5] green 1075 378] B: [sample [node ColorWheel5] blue 1075 378]
# In the Grade:
​
R: [sample [node this] red 1075 378]
G: [sample [node this] green 1075 378]
B: [sample [node this] blue 1075 378]
A: [sample [node this] alpha 1075 378]
Here again, you can call a node by name or with this.
After you define the channel the first number is from the X axis the second from the Y axis.
Formatting
![049.jpg](https://static.wixstatic.com/media/1e0ac4_c540fd5304ae47f4a7a6f23a3bddb6f7~mv2.jpg/v1/fill/w_150,h_75,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/049.jpg)
# Setting the number of decimals
​
Size: [format %.1f [value size]]
# Setting the number of characters
​
Filter: [format %.5s [value filter]]
You can find out more about the format function here.
Displaying different values
![056.jpg](https://static.wixstatic.com/media/1e0ac4_c1bd462f863344bdae4cff30d56dcddd~mv2.jpg/v1/fill/w_94,h_21,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/056.jpg)
## Showing layers
layers: [layers this]
![057.jpg](https://static.wixstatic.com/media/1e0ac4_b63da2ce5cdf48e59414a82f86b8fcdf~mv2.jpg/v1/fill/w_94,h_21,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/057.jpg)
## Showing channels
Channels: [channels this]
![058.jpg](https://static.wixstatic.com/media/1e0ac4_3af1ec24da59481aa0367e9c7f2172a5~mv2.jpg/v1/fill/w_94,h_21,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/058.jpg)
## Showing node
Node: [node this]
![059.jpg](https://static.wixstatic.com/media/1e0ac4_b30950035cf44ef486e1af701d130b11~mv2.jpg/v1/fill/w_141,h_10,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/059.jpg)
## List of knobs
Knobs: [knobs this]
![060.jpg](https://static.wixstatic.com/media/1e0ac4_31cd2e54c4cc4be4861fd0d056af0f0e~mv2.jpg/v1/fill/w_94,h_82,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/060.jpg)
## List of values
Values: [values this]
​
All values: [values -a this]
​
Non-default values: [values -d this]
![061.jpg](https://static.wixstatic.com/media/1e0ac4_a89e579c49f34f928b5959c824fd8870~mv2.jpg/v1/fill/w_108,h_39,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/061.jpg)
## Node info - same list of information that comes up when you select
a node and press i or nukescripts.getallnodeinfo() with python.
Info: [show_info]
![062.jpg](https://static.wixstatic.com/media/1e0ac4_979cf83895134a279b7a2811af0b6c51~mv2.jpg/v1/fill/w_94,h_35,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/062.jpg)
## Returns number of inputs
Inputs: [inputs this]
![063.jpg](https://static.wixstatic.com/media/1e0ac4_9edce5ddba8b4decb5d1ca679fdadbc0~mv2.jpg/v1/fill/w_94,h_41,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/063.jpg)
## Returns list of all plugins
Plugins: [plugins]
![064.jpg](https://static.wixstatic.com/media/1e0ac4_042606e19db0404aaaf18156edc5f6b1~mv2.jpg/v1/fill/w_142,h_10,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/064.jpg)
## Returns list of all formats
Formats: [formats]
![065.jpg](https://static.wixstatic.com/media/1e0ac4_9dbc8b9d1f22494398920061e9b58dc1~mv2.jpg/v1/fill/w_94,h_62,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/065.jpg)
## Returns the full name, when used in Group returns with name of Group
Full name: [full_name this]
![066.jpg](https://static.wixstatic.com/media/1e0ac4_d13c6489d2f347d6b0126529a70ca044~mv2.jpg/v1/fill/w_94,h_23,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/066.jpg)
## Dependent_nodes returns list of nodes that are connected via expression
Can use the lindex function to select item from the list.
Dependent node: [value [lindex [dependent_nodes this] 0].name]
![067.jpg](https://static.wixstatic.com/media/1e0ac4_58b5f1d0183f491a9655f5eb732949ca~mv2.jpg/v1/fill/w_94,h_26,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/067.jpg)
## Dependencies returns list of nodes that are connected via inputs
Dependency: [value [lindex [dependencies this] 2].name]
![068.jpg](https://static.wixstatic.com/media/1e0ac4_bd5d7b99a33d4e6db76d0f20c1c7afea~mv2.jpg/v1/fill/w_94,h_21,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/068.jpg)
## Returns filename when knob exist on node
[filename this]
Using variables
## Setting a variable
[set var1 25]
In the example above with using 'set' you can add the first argument 'var1' that is the variable and then the value '25' that it stores.
## Calling the variable
$var1
With $ before the name of the variable you can add the stored value -
In this case it is 25. You also don't need the square brackets '[ ]' here!
![041.jpg](https://static.wixstatic.com/media/1e0ac4_b06052d7428940139a8e38bbe30b0332~mv2.jpg/v1/fill/w_135,h_63,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/041.jpg)
![042.jpg](https://static.wixstatic.com/media/1e0ac4_c7c732c7e5ab4427bf59f6082f706d56~mv2.jpg/v1/fill/w_135,h_63,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/042.jpg)
When assigning value you can sample a knob value too.
[set transX [value translate.x]]
$transX
![044.jpg](https://static.wixstatic.com/media/1e0ac4_b7b0f71b67254c2c8771fbdb992c52ed~mv2.jpg/v1/fill/w_135,h_63,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/044.jpg)
When using the variable can also use the 'knob' function.
[set transX [value translate.x]]
[knob size $transX]
![046.jpg](https://static.wixstatic.com/media/1e0ac4_2fca1db204904d4696af9ee74f4cdfff~mv2.jpg/v1/fill/w_107,h_63,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/046.jpg)
You can also apply mathematical functions on the numerical values.
[set transX [value translate.x]]
sin($transX * 5)
![043.jpg](https://static.wixstatic.com/media/1e0ac4_f98909f773034481b72bb06851e64ce3~mv2.jpg/v1/fill/w_134,h_63,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/043.jpg)
When using a different node to sample for the variable it will
be connected with an expression line! (It is green by standard but you can
change in the Preferences)
[set shotName1 [file tail [value Read1.file]]]
shot1 : $shotName1
![047.jpg](https://static.wixstatic.com/media/1e0ac4_3c7fb458ae4e478c8ca1476ec7eade04~mv2.jpg/v1/fill/w_122,h_63,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/047.jpg)
You can also apply other functions on the stored strings.
[set shotName1 [file tail [value Read1.file]]]
shot1 : [string tolower $shotName1]
shot1 : [lrange [split $shotName2 _] 0 1]
Changing node's colour
## Changing node`s tile color with changing knob`s value.
[knob tile_color [value which]]
This one is for a Switch node that`s why it calls a`which` knob but you can use it with most knobs that generates numbers.
## Changing node`s tile color for 0 and 1.
[knob tile_color [ expr { [value which]? 814350335 : 4284416255 }]]
Displaying all root info
Root info
name: [value root.name]
project directory: [value root.project_directory]
frame range: [value root.first_frame] - [value root.last_frame]
fps: [value root.fps]
format: [value root.format]
proxy mode: [value root.proxy_type]
proxy scale: [value root.proxy_scale]
read proxy files: [value root.proxySetting]
color management: [value root.colorManagement]
OCIO config: [value root.OCIO_config]
monitor: [value root.monitorLut]
8bit files: [value root.int8Lut]
16bit files: [value root.int16Lut]
log files: [value root.logLut]
float files: [value root.floatLut]
views: [value root.views]
Commands for Text node
![015.jpg](https://static.wixstatic.com/media/1e0ac4_ef91f05e22d345479e4a89cf1f84152c~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/015.jpg)
## Showing all metadata's name (value not included) ##
​
[metadata]
​
![016.jpg](https://static.wixstatic.com/media/1e0ac4_735933e834044389a824867e0b228fdf~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/016.jpg)
## Showing certain metadata ##
​
Input/timecode: [metadata input/timecode]
Input/ctime: [metadata input/ctime]
Input/filesize: [metadata input/filesize]
Input/filereader: [metadata input/filereader]
![017.jpg](https://static.wixstatic.com/media/1e0ac4_e054aac7996e466cb122581523bbd535~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/017.jpg)
## Showing date in different ways​ ##
[clock format [clock seconds]]
[date]
![019.jpg](https://static.wixstatic.com/media/1e0ac4_1a4790b1f7a44ec9ad49e98524432914~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/019.jpg)
## Showing frame number in different ways ##
​
Frame: [value frame]
​
Frame: [python {nuke.frame()}
![020.jpg](https://static.wixstatic.com/media/1e0ac4_482e4a16d79749afb3b9a00a437b6955~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/020.jpg)
## Getting value with Node`s name ##
​
Node name: [value Read15.name]
File name: [lrange [split [basename [value [topnode].file]] .] 0 0]
File: [value Read15.file]
Format: [value Read51.format]
Frame Range: [value Read15.origfirst] - [value Read15.origlast]
Colorspace: [value Read15.colorspace]
![021.jpg](https://static.wixstatic.com/media/1e0ac4_ba2d6ea13bc44739b6eeb7d8f71f5c06~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/021.jpg)
## Breaking down values ##
​
Root dir: [file dirname [knob [topnode].file]]
File name: [file tail [knob [topnode].file]]
Shot name: [lrange [split [file tail [knob [topnode].file]] _ ] 0 1 ]
File extension: [file extension [knob [topnode].file]]
![022.jpg](https://static.wixstatic.com/media/1e0ac4_bf5c9f9e381c4e0caa1c895d911e86c5~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/022.jpg)
## Show filtered metadata (value not included) ##
​
[metadata keys *time*]
![018.jpg](https://static.wixstatic.com/media/1e0ac4_b0ecddde8555400e943c5d0cc54f0701~mv2.jpg/v1/fill/w_115,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/018.jpg)
## Time and Date in TCL ##
​
[date %%] a literal %
[date %a] weekday name (Sun..Sat)
[date %A] full weekday name (Sunday..Saturday)
[date %b] abbreviated month name (Jan..Dec)
[date %B] full month name (January..December)
[date %c] Unix style (Sat Nov 04 12:02:33 EST 1989)
[date %d] day (01..31)
[date %D] date (mm/dd/yy)
[date %e] day of month, blank padded ( 1..31)
[date %h] same as %b
[date %H] hour (00..23)
[date %I] hour (01..12)
[date %j] day of year (001..366)
[date %k] hour ( 0..23)
[date %l] hour ( 1..12)
[date %m] month (01..12)
[date %M] minute (00..59)
[date %p] AM or PM
[date %r] time, 12-hour (hh:mm:ss [AP]M)
[date %s] Unix seconds [date %S] second (00..60)
[date %T] time, 24-hour (hh:mm:ss)
[date %U] week number with Sunday as first day of week (00..53)
[date %V] week number with Monday as first day of week (01..53)
[date %W] week number with Monday as first day of week (00..53)
[date %w] day of week (0..6), Sunday = 0
[date %x] (mm/dd/yy)
[date %X] time, 24-hour (hh:mm:ss)
[date %y] year (00..99)
[date %Y] year (1970..)
[date %z] RFC-822 style numeric timezone (-0500)
[date %Z] time zone (e.g., EDT)
You can find more TCL functions that are useful in Text nodes HERE.
Display metadata
![074.jpg](https://static.wixstatic.com/media/1e0ac4_0c14d20445334169a82b7508c78bb800~mv2.jpg/v1/fill/w_108,h_62,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/074.jpg)
[metadata]
Display all metadata keys
![075.jpg](https://static.wixstatic.com/media/1e0ac4_94ba03c26c3c4a06ac69f696bdef623c~mv2.jpg/v1/fill/w_108,h_58,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/075.jpg)
[python {"/n".join(nuke.thisNode(). metadata())}]
Display all metadata keys with python
![076.jpg](https://static.wixstatic.com/media/1e0ac4_9bf6abefe29d4b4790cd23220a8ccc18~mv2.jpg/v1/fill/w_108,h_47,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/076.jpg)
[metadata input/timecode]
Display specific metadata's value
![077.jpg](https://static.wixstatic.com/media/1e0ac4_5b3bc2e7a352420ea817ee47e5a0aeeb~mv2.jpg/v1/fill/w_108,h_54,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/077.jpg)
[python {nuke.thisNode(). metadata().get("input/timecode")}]
Display specific metadata's value with python
![078.jpg](https://static.wixstatic.com/media/1e0ac4_129b81aed6b545b9b4758bdd22f4d5e3~mv2.jpg/v1/fill/w_108,h_57,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/078.jpg)
[metadata keys *time]
Display filtered metadata keys ( ones that end with "time" here )
![079.jpg](https://static.wixstatic.com/media/1e0ac4_e70b9ca2651c4ab4b88cf69f5eb1e69f~mv2.jpg/v1/fill/w_108,h_63,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/079.jpg)
[python -exec {
timeMetas = []
for i in nuke.thisNode().metadata():
if i.endswith("time"):
timeMetas.append(i)
timeMeta = ('\n '.join(timeMetas))
}] [python timeMeta]
Display filtered metadata keys with python ( ones that end with "time" here )
![080.jpg](https://static.wixstatic.com/media/1e0ac4_1f764b756a46494e8465742c79942242~mv2.jpg/v1/fill/w_108,h_64,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/080.jpg)
[metadata keys]
Display all metadata keys
![081.jpg](https://static.wixstatic.com/media/1e0ac4_c5c81269d1cf428b8d614cb8b161edf3~mv2.jpg/v1/fill/w_108,h_60,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/081.jpg)
[metadata values]
Display all metadata keys with values
![080.jpg](https://static.wixstatic.com/media/1e0ac4_2a6b0fe4585d48c0a57bfc0ca1936cc6~mv2.jpg/v1/fill/w_108,h_54,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/080.jpg)
[metadata -s "\n " keys input/*]
Display filtered metadata keys with custom separator ( ones that starts with "input/" here )
![083.jpg](https://static.wixstatic.com/media/1e0ac4_d808d4fa6c284e0ca540a2e6ecead828~mv2.jpg/v1/fill/w_108,h_59,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/083.jpg)
[metadata -v ": " values]
Display metadata keys with values using custom separator
![084.jpg](https://static.wixstatic.com/media/1e0ac4_26d81ef58a584796910ab0e46593e391~mv2.jpg/v1/fill/w_108,h_57,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/084.jpg)
[metadata -v ": " values *time*]
Display filtered metadata keys with values using custom separator
( ones that includes "time" here )
![085.jpg](https://static.wixstatic.com/media/1e0ac4_06a2ef1cb51142bc8fba8d78dba888f1~mv2.jpg/v1/fill/w_108,h_69,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/085.jpg)
[metadata -n Read15 values]
Display metadata keys with values from specific node
![086.jpg](https://static.wixstatic.com/media/1e0ac4_66111ded26e34e0395026c2afc6067de~mv2.jpg/v1/fill/w_108,h_56,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/086.jpg)
[metadata -n Read15 input/timecode]
Display metadata value from specific node
Referencing Foundry page.
Adding images / emojis to nodes with html
![023.jpg](https://static.wixstatic.com/media/1e0ac4_4779101abc1b4c0db49625e50a88ea0c~mv2.jpg/v1/fill/w_108,h_48,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/023.jpg)
<img src= "Shuffle.png">
You can add the image of any default node icon by putting its name instead of the `Shuffle`​.
![024.jpg](https://static.wixstatic.com/media/1e0ac4_ba6d9b9699954d3c8c6289c03e14dce4~mv2.jpg/v1/fill/w_108,h_19,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/024.jpg)
![025.jpg](https://static.wixstatic.com/media/1e0ac4_2f0b349e89034fbba23eac3c3db179a3~mv2.jpg/v1/fill/w_178,h_131,al_c,q_80,usm_0.66_1.00_0.01,blur_3,enc_avif,quality_auto/025.jpg)
<img src= "D:/gatimedia_white_logo.png">
You can also add any image to a label, just copy the path between the quotation marks.
Even more fun is that you can use emojis in Nuke!
In this example I added the code to the Text knob
![069.jpg](https://static.wixstatic.com/media/1e0ac4_4c39845c110842bab09facfd5a3835c9~mv2.jpg/v1/fill/w_108,h_50,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/069.jpg)
<p style="font-size:100px">🦁</p>
The code is from here where you can find a lot more codes for different emojis.
There is a site also for smiley emojis and for different skin tones!
​
In this fomula you can adjust the size ( which is 100px here ),
and which emoji you want to display by changing the decimal code ( which is 129409 here ).
![070.jpg](https://static.wixstatic.com/media/1e0ac4_09458df3c1a44536a53e76ac26a8a41c~mv2.jpg/v1/fill/w_108,h_42,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/070.jpg)
<p style="font-size:100px">🤘🏿</p>
For changing the skin tone you need to use two decimal codes - first for the type of emoji and the second one for the skin tone.
![071.jpg](https://static.wixstatic.com/media/1e0ac4_a7e33ecdb3e44c7eb25c43660390f264~mv2.jpg/v1/fill/w_108,h_31,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/071.jpg)
<p>I will display 🦁</p>
Can also use the decimal code without setting the size and it will be the size of the text.
Make sure you define the paragraph before and after ( <p> - start, and </p> - end ),
otherwise it will only appear as a text.
![072.jpg](https://static.wixstatic.com/media/1e0ac4_d886a61e7a9f4ced8bc797ff2b4b431d~mv2.jpg/v1/fill/w_108,h_36,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/072.jpg)
You can also add emojis to the label but it might won't look as expected.
![073.jpg](https://static.wixstatic.com/media/1e0ac4_545882af59864b689fdd43c68e0379a9~mv2.jpg/v1/fill/w_108,h_32,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/073.jpg)
Also can use them as name of the user knobs.
Text editing with html
![026.jpg](https://static.wixstatic.com/media/1e0ac4_a7002c47a84b480f9da0cf2cb055cee6~mv2.jpg/v1/fill/w_80,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/026.jpg)
## Center ##
​
<center>Lorem Ipsum</center>
![028.jpg](https://static.wixstatic.com/media/1e0ac4_088493f34c4d4734bb5a1f8a261cb67e~mv2.jpg/v1/fill/w_83,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/028.jpg)
## Italic ##
​
<i>Lorem Ipsum</i>
![030.jpg](https://static.wixstatic.com/media/1e0ac4_aaf3b6d5ba124de294778b0f3718070f~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/030.jpg)
## Strikethrough ##
​
<s>Lorem Ipsum</s>
![031.jpg](https://static.wixstatic.com/media/1e0ac4_672e634a038f4af0bede9ad51c230868~mv2.jpg/v1/fill/w_80,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/031.jpg)
## Changing font colour with Hex code ##
​
<font color=#582b00>Lorem Ipsum</font>
![035.jpg](https://static.wixstatic.com/media/1e0ac4_dd39cc089a624697a4f6630fcc14a772~mv2.jpg/v1/fill/w_82,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/035.jpg)
## Superscript ##
​
Lorem <sup>Ipsum</sup>
![036.jpg](https://static.wixstatic.com/media/1e0ac4_9275479f858f4f389f4a92c0308f88f9~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/036.jpg)
## Align text to the right 1 ##
​
<p style="text-align:right">Lorem Ipsum</p>
![037.jpg](https://static.wixstatic.com/media/1e0ac4_a1658a9f02eb463e891abb9c9ff6a29d~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/037.jpg)
## Strong ##
​
<strong>Lorem Ipsum</strong>
![039.jpg](https://static.wixstatic.com/media/1e0ac4_5ea562f3f0864379aef6fdf661a68b7e~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/039.jpg)
## Small ##
​
<small>Lorem Ipsum</small>
![027.jpg](https://static.wixstatic.com/media/1e0ac4_24eabc75c84347cf963b61ff42d25abf~mv2.jpg/v1/fill/w_80,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/027.jpg)
## Bold ##
​
<b>Lorem Ipsum</b>
![029.jpg](https://static.wixstatic.com/media/1e0ac4_01cfd0740edc4acdb85decb9c7e85a60~mv2.jpg/v1/fill/w_82,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/029.jpg)
## Underline ##
​
<u>Lorem Ipsum</u>
![033.jpg](https://static.wixstatic.com/media/1e0ac4_4570a2f48f90444cae1250ccecd50d9e~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/033.jpg)
## Font size ##
​
<font size="5">Lorem Ipsum</font>
![032.jpg](https://static.wixstatic.com/media/1e0ac4_84e359659d234376ae61dac8c04cc7f2~mv2.jpg/v1/fill/w_80,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/032.jpg)
## Changing font colour with colour`s name ##
​
<font color=aqua>Lorem Ipsum</font>
![034.jpg](https://static.wixstatic.com/media/1e0ac4_e25e274b4bbf41cf8d3b46f25945c58f~mv2.jpg/v1/fill/w_82,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/034.jpg)
## Subscript ##
​
Lorem <sub>Ipsum</sub>
![036.jpg](https://static.wixstatic.com/media/1e0ac4_9275479f858f4f389f4a92c0308f88f9~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/036.jpg)
## Align to the right 2 ##
​
<p align="right">Lorem Ipsum</p>
![038.jpg](https://static.wixstatic.com/media/1e0ac4_4d710ea0c66c4469bf0a536566a05581~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/038.jpg)
## Big ##
​
<big>Lorem Ipsum</big>
![040.jpg](https://static.wixstatic.com/media/1e0ac4_7564febaebed4fbc985c24d6e8ffb343~mv2.jpg/v1/fill/w_79,h_18,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/040.jpg)
## Emphasized ##
​
<em>Lorem Ipsum</em>
![051.jpg](https://static.wixstatic.com/media/1e0ac4_8e7532113a6442378e19e644f04c4466~mv2.jpg/v1/fill/w_108,h_52,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/051.jpg)
## Headers ##
​
<h1>Lorem Ipsum</h1>
<h2>Lorem Ipsum</h2>
<h3>Lorem Ipsum</h3>
​
​
<h4>Lorem Ipsum</h4>
<h5>Lorem Ipsum</h5>
Lorem Ipsum
![052.jpg](https://static.wixstatic.com/media/1e0ac4_d0f4a7b1ebd64c4e9c08b1158dc4d342~mv2.jpg/v1/fill/w_107,h_45,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/052.jpg)
## Adding a link to a node using a Text knob ##
​
<a href="https://www.gatimedia.co.uk/">Visit my page!</a>
Environment variables
![053.jpg](https://static.wixstatic.com/media/1e0ac4_f85755a556944403aec387a738194108~mv2.jpg/v1/fill/w_108,h_47,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/053.jpg)
## Using python in the script editor to print all env variables ##
​
import os
for k,v in sorted(os.environ.items()):
print (k,": ",v)
You can find out more about how to use python snippets HERE.
![054.jpg](https://static.wixstatic.com/media/1e0ac4_a79e35bb90a245e2bcc40050fe1bd178~mv2.jpg/v1/fill/w_108,h_69,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/054.jpg)
## Using TCL to print all env variables ##
​
[array get env]
​
## Search in the array
​
[array get env *NUKE*]
![055.jpg](https://static.wixstatic.com/media/1e0ac4_1136a49e076b49e8ba8a728cbac4d97d~mv2.jpg/v1/fill/w_107,h_43,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_avif,quality_auto/055.jpg)
## Using TCL to print specific env variable ##
​
[getenv NUKE_TEMP_DIR]
Useful links
If you want to dig deeper into the wonderful ( and often frustrating ) world of TCL commands in Nuke you should visit Nuke TCL Scripting Documentation.
Hope you will find it useful!