Max’s Nuke Python, TCL and Expression Snippets

Just one more blog with python and TCL snippets that I use frequently in Nuke. More can be found on my github:

https://github.com/plasmax/nuke-python


Python 

https://docs.thefoundry.co.uk/nuke/100/pythonreference/
https://docs.thefoundry.co.uk/nuke/100/pythondevguide/

To remove all knobChanged, updateUI, autolabel callbacks from a nuke script:
[n.knob('knobChanged').setValue(None) for n in nuke.allNodes(recurseGroups=True)]
[n.knob('updateUI').setValue(None) for n in nuke.allNodes(recurseGroups=True)]
[n.knob('autolabel').setValue(None) for n in nuke.allNodes(recurseGroups=True)]


TCL 

 

http://www.nukepedia.com/tcl/tcl-reference

To get the session node id (e.g. node019b423b). Replace node_full_name with something like root.Group1.Group3.Grade2
node node_full_name

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s