that will gives you as a simple exemple

s = nuke.selectedNode()
createMerge = nuke.nodes.Merge2(operation="screen")
createMerge.setInput(0,s)
createMerge.setInput(1,s)
createMerge.setInput(3,s)
createMerge.setInput(4,s)

....

that will connect your selected node to four connections on a merge node.
Note that i avoided the setInput 2 which is the mask

cheers
O
________________________________________
From: Olivier Jezequel [[email protected]]
Sent: 25 March 2013 13:03
To: Nuke Python discussion
Subject: RE: [Nuke-python] A way to access to the connection "name" ("A",       
"B",    "mask")

Not that i know,
But the inputs are consistent
it always take the default setting as base.
that mean any node with 1 input + 1 mask input
input 0 is the main, input 1 is the mask
any node with a 3 inputs, even if it can takes more (like a merge)
input 0 and 1 are the main inputs(with 0 is B if i am not messing), Input 2 is 
the mask, input 3,4,5 all other will be extra main inputs


________________________________________
From: Dorian Fevrier [[email protected]]
Sent: 26 February 2013 10:19
To: Nuke Python discussion
Subject: [Nuke-python] A way to access to the connection "name" ("A", "B",      
"mask")

Hi all!

When you create a node (let's say "merge"), the node has 3 possible
connections:

A
B
mask

But it doesn't seem to be a way to get this names. All you get is the
number of possible connections...

I wonder if there is a way to get in Python the "name" of the connection.

Something like.

myNode.inputName(0) could be enought.

Thanks in advance! :)

Regards,

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

Reply via email to