Trying to wraph my head around Python within Nuke.
I am trying to predefine a Shuffle node so it spits out Red in all the output channels – when doing so manually i get the following output in the ScriptEditor:
print nuke.selectedNode()
# Result: in rgba
in2 none
red blue
green blue
blue blue
alpha blue
black red2
white green2
red2 blue2
green2 alpha2
out rgba
out2 none
The output makes sense but I am having a choke trying to formulate it via python – so far i’ve got this written to create the node and connected but not sure what the syntax would be to achieve the desired result.
def redChan():
redChan = nuke.createNode("Shuffle", inpanel = False)
redChan.setName("Red Chan Shuffle")
redChan.setInput(0, shadowInvert)
redChan()
A push in the right direction would be much appreciated – and let me know if I am not making sense.
Post a Comment