Expressions

Write node filename from connected read node using switch

[regsub "\\.dng$" [file dirname [value [topnode Switchnode.input[value Switchnode.which]].file]]/optionalFolder/[file tail [value [topnode Switchnode.input[value Switchnode.which]].file]] ".%04d.jpg"]



View Meta data as text:

https://learn.foundry.com/nuke/8.0/content/user_guide/metadata/accessing_metadata_tcl.html


Simple and usefull Expressions:

#parent.knob(framenumber) will return the value at the particular frame 

# width - gives the format width of the given input of the current node

# height - gives the format height of the given input of the current node

# x,y,frame - gives the current frame

# clamp(value,min.max) - clamps the given value to the min and max

# Simply referencing any knobName is same as the parent.knobName when working inside group node


EXPRESSION NODE Expression:

#in expression node "x" is the X coordinate of every pixels it wont give you the current frame

    same applies for "y"

#in expression node channel(x,y) will gives you the value of the given channel at the given 2d position x,y

#Quick stmap with Expression node

    x/width in r

    y/height in g

    0 in b

#averaging Nans

isnan(r)?r(x+1,y):r


Learning Resources:

http://www.nukepedia.com/written-tutorials/expressions-101

http://cameroncarson.com/nuke-wave-expressions/