# Two viewer nodes, switch between output images

Is it possible to switch between the output images of two Viewer Nodes? To get the rgba values and the z-depth, i linked a Render Layer node to two Viewer Nodes (one for rgba and one for z-depth). Even if i change the name of the node, i can only access on the picture with:

bpy.data.images['Viewer Node'].pixels


I tried to select the other node (and deselecting the previous one), but even then i get the same results (bpy.data.images['Viewer Node'].pixels[0]) as before. I noticed, if i select the node manually in the node editor, then the result changes, but also the python log was not helpful.

Is there another way to solve this? Thank you.

• Can you not just use the Split Viewer node to do what you need? Jun 18, 2015 at 16:42
• It doesn't look like you can set the active viewer node from Python. Viewer data will always be in that image datablock ('Viewer Node') so you'd have to change the node. What are you trying to do with this? Jun 18, 2015 at 16:46
• Do you remember how you solved this?
– Amir
Mar 10, 2018 at 8:36