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

Maya Tips and Handy Scripts

Decided to keep a log of useful Maya MELscripts & settings I’ve collected from all over the web!

Camera Switching scripts http://forums.cgsociety.org/archive/index.php/t-983953.html
CameraListDialog.mel
SwitchPerspCam.mel

Wireframe Toggle On/Off (Useful for previewing surfaces on selected objects)
ToggleWireframe.mel

Reload All Textures in scene
UpdateAllSceneTextures.mel

Align Pivot to Central Base of object
BasePivot.mel

Toggle Between OS and QT Import/Export Dialog Window (Useful if Maya’s Dialog Runs Slow!)
OSExplorerDialogSwitcher.mel

Toggle Isolate Select Script
http://nerd.paololazatin.com/toggle-isolate-selected-in-maya/

ToggleIsolateSelected.mel

ToggleXray.mel
ObjectMaterialAttributes.mel
RefreshSelectedSwatches.mel
SetSelectedTextureNodeDirectory.py

Set Selected Objects’ Normal Angles to 45
ToggleXray.mel

David Luong’s Matte Painting Challenges

I’ve been taking part in some DMP challenges over on CGSociety. The first, “Monolithic City”, I haven’t completed yet, but here are the latest concept and Matte WIP:

That was August. September’s was “Ancient Walled Kingdom”.

Now it’s October and the theme is Barlangis, an abandoned industrial mining city on the edge of nowhere.