Skip to content

Instantly share code, notes, and snippets.

View sean-c-johnston's full-sized avatar

Sean Johnston sean-c-johnston

View GitHub Profile
@sean-c-johnston
sean-c-johnston / quickimport.py
Created May 19, 2014 22:36
Nuke 'Quick Importer'
import nuke
import os
import re
from PySide import QtGui
from PySide import QtCore
from nukescripts import panels
class QuickReadBrowser(QtGui.QMainWindow):
@sean-c-johnston
sean-c-johnston / allNodeReload.py
Last active June 25, 2020 07:37
Nuke script, reloads all Read nodes to update any images that may have changed.
def allNodeReload():
'''Reloads all applicable nodes in the project.'''
rl, nr = 0
for node in nuke.allNodes():
if node.knob("reload"):
rl += 1
print node.name()
node.knob("reload").execute()
else:
nr += 1
@sean-c-johnston
sean-c-johnston / constantDraw.py
Last active August 29, 2015 13:59
Nuke script. Down-rezzes and re-draws the selected read node in the Node Graph, using Constant nodes as pixels. Accounts for aspect ratio. More than 20x20 not recommended for performance reasons.
def draw_constant(res=10):
"""Re-draws a Read node using Constant nodes as pixels."""
# Checks that the user has selected a Read node.
try:
if nuke.selectedNode().Class() != "Read":
# Pushes pop up message to the user
nuke.message("No Read node selected to re-draw!")
return False
except ValueError: