Working in Nuke again kinda feels good. Working with many-layered EXR image sequences can be a bit tedious when you have a lot to set up. So I created this simple little script you can run from the script editor or encapsulate it in a function definition and call it whenever you wish. I set it up to pull out every channel except for the default RGBA since you can just pull that directly from the read node. It will create a shuffle node for each channel, hook it up, and even make it a postage stamp so you can get an idea of what your shuffling out. Just make sure you’re only grabbing Read nodes before you run this, otherwise the script will ignore the node and it will seem as if it is doing nothing. Let me know if something gets messed up, I’m still trying to get used to this code viewer plugin for wordpress.

nodes = nuke.selectedNodes()
for node in nodes:
	if node.Class() == 'Read':
		channels = node.channels()
		layers = list( set([channel.split('.')[0] for channel in channels]) )
		layers.sort()
		if 'rgba' in layers:
			layers.remove('rgba')
		for layer in layers:
			shuffleNode = nuke.nodes.Shuffle(label=layer,inputs=[node])
			shuffleNode['in'].setValue( layer )
			shuffleNode['postage_stamp'].setValue(True)
	else:
		pass