You map the input checkboxes to the output checkboxes by name (red/red2, 
green/green2, etc).

So to shuffle the red channel of input 1 into the rgba output layer with the 
green and blue channels of input 2, you just need to do:

n = nuke.nodes.ShuffleCopy()
n[‘red’].setValue(‘red’)

In a fresh node, the mapping is this (in the form <outputChan>: <inputChan>):

red: red2
green: green2
blue: blue2
alpha: alpha2

One other important thing to note is that the layer 2 channel output knobs are 
named incorrectly (at least as of 6.2v1).
>From top to bottom, all of the output knobs are named as follows:
-red
-green
-blue
-alpha
-black
-white
-red2
-green2

when you would expect:
-red
-green
-blue
-alpha
-red2
-green2
-blue2
-alpha2

Hope this isn’t too confusing

-Nathan



From: Stu Schwartz 
Sent: Thursday, March 31, 2011 9:54 PM
To: [email protected] 
Subject: [Nuke-python] set Shuffle Copy channels

Hi All,
I am a relatively new Nuke-Python user.   I am having trouble setting the 
channels of a Shuffle Copy through my python script.

sc = nuke.createNode("ShuffleCopy")
sc['in'].setValue('rgba')

--sc['in.r'].setValue('True')--??
or
--sc = nuke.createNode("ShuffleCopy", in.r = True)--??

something along these lines.

All that I want is for the ability to set the check boxes and be able to 
shuffle the red channel of one image with the green and blue channels of 
another image.

Thanks for any help,
-Stu



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

Reply via email to