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 can't 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
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')
M
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python