just found out myself

ch= x['channels'].value()

returns the string...




On 03/16/2012 01:06 PM, Johannes Hezer wrote:
Hi

I wanted to make a short script that basically toggles the viewer to the selected nodes channel. (rgba, alpha, etcpp) thought this would be a short one.. but I got stopped right at the beginning...

x=nuke.selectedNode()
print x   # here it prints channels rgba   etc pp
ch= x['channels'].getValue()
print ch #here it prints a float which changes when changing the channel so somewhere this is connected but where ??
viewer = nuke.activeViewer().node()['channels']
viewer.setValue(ch) #and here it needs a proper string of a channel like rgba alpha etc pp


Question how do I get the channel out of the node as a string ?
Or where is the list where the channels are stored in...
nuke.Node.channels(x)
lists all channels but not the "layer sets"

Cheers

Johannes



_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to