Skip to content

Latest commit

 

History

History

_tcl

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

TCL in a nutshell 🌰

Useful things in TCL, also used by Nuke Expressions

Syntax

Labelling

Return Values
// knob value
[value this.name]

// input knob value
[value this.input.name]

// input knob value outside group
[value this.parent.input.name]

// node channel value at [x,y]
[sample [node input] red 10 10]

// topnode
[value [topnode].name]

// knob value with decimal limit
[format "%.2f" [value knobname]]
File Path
// File Path (no extension)
[file rootname [value [topnode].file]]

Knob Values ('Add Expression')

// ifs
a > 0 ? 1 : 0

// random
( random( seed, frame * freq ) * amp ) + offset
( random( 101, frame * 0.5 ) * 3 ) + 5

// knob value at frame
nodename.knob.( frame )
Transform1.translate.x ( 50 )

// animation curve at frame
curve( frame )

// animation curve inverse
nodename.knob.inverse
TimeWrap1.lookup.inverse

Expression Node

// pixel value
x( frame )
y( frame )

// comp size
width
height

// math
sin( x )
sqrt( x*x + y*y )
atan( x, y )
abs( v )

// generating noise
fBm(x, y, z, octaves, lacunarity, gain) // full range values
turbulence(x, y, z, octaves, lucanarity, gain) // only abs values
noise(x, y, z)

Snippets

UV with overscan
(((((x+overscan)/(width+overscan*2))*(width+overscan*2))-overscan)/width)-(0.5/width)
(((((y+overscan)/(height+overscan*2))*(height+overscan*2))-overscan)/height)-(0.5/height)
Boolean with inputs
![ exists parent.input[value nodename.number] ]
Randomize with controls

predefined knobs: seed, phase, freq, val_max, offset, fade

((random(seed,(frame+phase)*freq))*val_max+offset)*fade

sample: fade.nk Different types of waves: Nuke Wave Expressions