Skip to content

Instantly share code, notes, and snippets.

@kpprt
Last active January 14, 2016 14:03
Show Gist options
  • Save kpprt/9709d888c631e55a8b93 to your computer and use it in GitHub Desktop.
Save kpprt/9709d888c631e55a8b93 to your computer and use it in GitHub Desktop.
Get the maximum frame range of all write nodes in Nuke
import nuke
in_min = sys.maxint
out_max = -sys.maxint
for n in nuke.allNodes():
if n.Class() == 'Write':
n_in = int(n.knob('first').getValue())
n_out = int(n.knob('last').getValue())
if(n_in < in_min):
in_min = n_in
if(n_out > out_max):
out_max = n_out
print str(in_min) + '-' + str(out_max)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment