New Layers

Hey Guys,

I am trying to create a script that make new channel layers .. I am using the nuke.Layer() function to do this. The layers are getting created (I can see them in the viewer drop down) but I cant see them in my ‘copy’ nodes … here is a snippet. Any thoughts would be great.

#add new channel for each read node
nuke.Layer( read_node, [‘red’, ‘green’, ‘blue’] ) # new channel layer

print (read_node)+’ ‘+str(item_count)
if item_count > 0 : # if the read node is not the first in the collection … make a copy node

prev_copy_node = nuke.selectedNode() # get the current copy node
rn_copy = nuke.createNode("Copy") # make a new copy node
rn_copy.setName(‘cp_’+read_node) # name it to match the read node
x = nuke.toNode(read_node) # assign the read node to x
nuke.toNode(rn_copy.name())
rn_copy.setInput(0, prev_copy_node) # set the input from the previous copy node
rn_copy.setInput(1, nuke.toNode(read_node)) # set the input from teh read node
nuke.toNode(rn_copy.name())
rn_copy.knob("from0") .setValue(‘rgba.red’)
rn_copy.knob("to0") .setValue(read_node+’.red’)
rn_copy.knob("from1") .setValue(‘rgba.green’)
rn_copy.knob("to1") .setValue(read_node+’.green’)
rn_copy.knob("from2") .setValue(‘rgba.blue’)
rn_copy.knob("to2") .setValue(read_node+’.blue’)

No Responses to “New Layers”

Post a Comment