Follow this blog

Customize in /user/extras/follow-sheet.tmpl.php.

Sample text.

Telegram, X or  Twitter, Facebook, VK, LinkedIn, Odnoklassniki, Pinterest, YouTube, TikTok, RSS JSON Feed

Sample text.

Boring Image Processing Blog

GitHub   About

Disconnecting All Viewers on Script Load

This is a lifesaver of a hook. If a broken node completely freezes your script, Nuke won’t even finish loading it unless you disconnect the viewers first. This leaves you completely blind, unable to debug what’s causing the crash or fix the issue.

Drop this code into your main menu.py inside the .nuke folder:

def disconnectAllViewers():
    for node in nuke.allNodes('Viewer'):
        for i in range(node.inputs()):
            node.setInput(i, None)
            
nuke.addOnScriptLoad(disconnectAllViewers)

This function plugs directly into the addOnScriptLoad() callback. When triggered, it loops through every input of every Viewer node in the script and cuts the connection.