Skip to content

Instantly share code, notes, and snippets.

@paulwinex
Created December 10, 2015 17:49
Show Gist options
  • Save paulwinex/28555dd80efe080a491f to your computer and use it in GitHub Desktop.
Save paulwinex/28555dd80efe080a491f to your computer and use it in GitHub Desktop.
import nuke
def createShuffleEXR(gradeNodes):
sel =nuke.selectedNode()
chanList=[]
rr = sel.channels()
for i in rr:
temp = i.split('.')
if (len(chanList)) == 0:
chanList.append(temp[0])
elif chanList[-1]!=temp[0]:
chanList.append(temp[0])
for i in chanList:
tempNode = nuke.nodes.Shuffle(name=i)
tempNode.setInput(0, sel)
tempNode['in'].setValue(i)
tempNode['postage_stamp'].setValue(True)
if (gradeNodes==1):
gNode = nuke.nodes.Grade(name=("Grade_"+i))
gNode.setInput(0, tempNode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment