I believe he could also do:

nuke.createNode("Shuffle", "in rgb red red green green blue blue", 
inpanel=False)

If the specified layer is already existent. 

On 06/10/2011, at 15:59, Nathan Rusch <[email protected]> wrote:

> There are a couple issues here. First of all, the layer you want to use needs 
> to exist before you can set the ShuffleCopy node to use it; you can’t set the 
> out knob to 'new,' since that’s not actually a layer. If you know what your 
> layer needs to be, you’ll need to add it via a Python or TCL call before you 
> try to set up the ShuffleCopy. Otherwise, you’ll have to rely on the user 
> having added it before your script runs.
>  
> Secondly, you’re mixing up the 2 main knob access methods slightly. You 
> either want to use n.knob('out2').setValue('theLayer') or 
> n['out2'].setValue('theLayer'). Passing it as a kwarg to the 
> nuke.nodes.ShuffleCopy constructor will also work: n = 
> nuke.nodes.ShuffleCopy(out2='theLayer'). If you’re using this method, 
> remember that you won’t be able to specify the 'in' knob value as a 
> constructor kwarg, since 'in' is a reserved word in Python.
>  
> -Nathan
> 
>  
> From: Matias Volonte
> Sent: Thursday, October 06, 2011 11:47 AM
> To: Nuke user discussion
> Subject: Re: [Nuke-users] nuke python - ShuffleCopy
>  
> I am trying to create a shuffleCopy node using python and set the out2 to new 
> layer but nuke doesn't let me do it, any advice on this?
>  
> Example:
>  
> if I pass a parameter here doesn't work:
> nuke.nodes.ShuffleCopy()
>  
> and like this neither,
>  
> n = nuke.nodes.ShuffleCopy()
> n.knob['out2'].setValue('new')
>  
>  
> From: "[email protected]" <[email protected]>
> To: Nuke user discussion <[email protected]>
> Sent: Sunday, October 2, 2011 5:02 PM
> Subject: Re: [Nuke-users] nuke python - ShuffleCopy
> 
> Wow, a bit too odd for me. Thanks Nathan for your answer, i really appreciate
> cheers
> philhub
> 
> 
> 
> ----- Mail original -----
> De: "Nathan Rusch" <[email protected]>
> À: "Nuke user discussion" <[email protected]>
> Envoyé: Samedi 1 Octobre 2011 19:07:21
> Objet: Re: [Nuke-users] nuke python - ShuffleCopy
> 
> You are missing something, but that something happens to be a long-standing
> "bug" (feature?) in the ShuffleCopy node in which the layer 2 channel output
> knobs are named incorrectly. From top to bottom, all of the output knobs are
> named as follows:
> 
> -red
> -green
> -blue
> -alpha
> -black
> -white
> -red2
> -green2
> 
> Therefore, what you would expect to be 'red2' is actually 'black', etc.
> 
> -Nathan
> 
> 
> -----Original Message-----
> From: [email protected]
> Sent: Saturday, October 01, 2011 1:38 AM
> To: Nuke user discussion
> Subject: Re: [Nuke-users] nuke python - ShuffleCopy
> 
> Concerning ShuffleCopy it seems to have another more annoying bug.
> The channel select box of the second output behave wildy, i can't manage to
> tick the red and green box.
> Let copy/paste this example to see what i mean
> 
> first to check the normal behavior :
> 
> shuf = nuke.createNode("ShuffleCopy")
> shuf['red'].setValue('alpha')
> shuf['green'].setValue('alpha')
> shuf['blue'].setValue('alpha')
> 
> then this snippet shows the weird thing :
> 
> shuf['out'].setValue('none')
> shuf['out2'].setValue('rgba')
> shuf['red2'].setValue('alpha')
> shuf['green2'].setValue('alpha')
> shuf['blue2'].setValue('alpha')
> 
> only the two last (blue and alpha) triggers, not red and green.
> 
> 
> Am i missing something, or is it a known bug, otherwise i'll go report it to
> the support
> cheers,
> philhub
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> 
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> 
> 
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to