Q100036: Improve script performance by disabling thumbnails or setting them to static frames in Nuke

Follow

SUMMARY

This article will explain how to disable the thumbnails in Nuke being displayed, or to set them to static to help improve performance.

MORE INFORMATION

On rare occasions when Nuke scripts become quite large, it can sometimes be beneficial to either set the postage stamp on nodes to be static, or disable the thumbnails in order to improve performance.

Setting nodes to have static postage stamps is possible by setting it in Preferences:
1. Open Nuke
2, Open Edit > Preferences
3. Navigate to the Node Graph tab
4. Set 'postage stamp mode' to 'Static Frame'
5. Select 'OK'

Disabling thumbnails can be done on a per node basis, by opening the Read nodes properties, selecting the node tab and unchecking 'postage stamp'. However, you can disable all thumbnails by running the following code in the Script Editor:

for nodes in nuke.allNodes():
if nodes.Class() == "Read":
nodes.knob("postage_stamp").setValue(False)


If you would like to disable the thumbnails on Read nodes by default, then you will need to modify your 'init.py' file. To do this please do the following:

1. Navigate to your ~/.nuke directory
2. Open your init.py file in a text editor. If you do not have an init.py already, you will need to create one.
3. Paste the following code into your init.py and save the file:

nuke.knobDefault("Read.postage_stamp", "False")


Result: This will disable postage stamps on any newly created Read nodes only, and will not effect Read nodes in any pre-existing .nk scripts. More information about setting default values for knobs can be found in the Nuke documentation:
Setting Default Values for Controls

 

Alternatively, you can select any nodes with an active postage stamp and use the hotkey ALT+P to enable/disable the static image.

We're sorry to hear that

Please tell us why