That SyntaxError is because you are missed the closing ")", although it still wouldn't work..

The string you have is passed as the second argument to nuke.createNode, like this:

nuke.createNode("Shuffle", "red {red} green {green} blue {blue} alpha {alpha}")

That is the "old way" of setting knob parameters, as it involves creating a Tcl string with the arguments. The w['red'].setValue("red") method is more modern/robust.

On 11/04/13 05:00, radvfx wrote:
I couldn't get the above to work.

Using:
nuke.Shuffle("red {red} green {green} blue {blue} alpha {alpha}")

Results in:
# Result:
File "", line 1
nuke.Shuffle("red {red} green {green} blue {blue} alpha {alpha}"
^
SyntaxError: unexpected EOF while parsing

----

But for simple stuff, this works:

w = nuke.nodes.Shuffle()
w['red'].setValue("red")
w['green'].setValue("green")
w['blue'].setValue("blue")
w['alpha'].setValue( "white" )

OR similarly:

w = nuke.nodes.Shuffle()
w['red'].setValue("black")
w['green'].setValue("black")
w['blue'].setValue("black")
w['alpha'].setValue( "red" )

For inputs mapping to outputs, I would start looking here for clues:
http://docs.thefoundry.co.uk/nuke/70/pythondevguide/channels.html?highlight=channels

Cheers
- Jim


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

--
ben dickson
2D TD | ben.dick...@rsp.com.au
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to