Ironically, the channels knob expects a "layer" name, not a channel name.
Try this:
w = nuke.nodes.Write()
w["channels"].setValue("backward")
And then, if you only want to set it to one of the channels in that layer
(say, backward.v), you can turn off the others:
w['channels'].enableChannel(0, False)
On Mon, Feb 28, 2011 at 8:44 AM, Volker <[email protected]> wrote:
> Hi,
>
> setting a channel knob to the fourth channel of a layer does not seem to
> work for me. I tried:
>
> w = nuke.nodes.Write()
> w["channels"].setValue("backward.v")
> w.knob("channels").setValue("backward.v")
> nuke.tcl("knob Write1.channels backward.v")
>
> and the result is that channels is actually always "none". In the panel,
> the fourth checkbox is set, but the dropdown is set to "none". So, how
> to do it from Python?
>
> Thanks,
> -Volker
> _______________________________________________
> 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