Last active
January 14, 2016 14:03
-
-
Save kpprt/9709d888c631e55a8b93 to your computer and use it in GitHub Desktop.
Get the maximum frame range of all write nodes in Nuke
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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