merge setInput in python

Hi everyone,

I’m having an issue trying to figure out how to connect the mask input on a merge node to connect to a rotopaint node in python.

I want the A input of the merge attached to a read node. B input connected to nothing. Mask connected to roto.

Right now I have this:

#create merge
mergeroto = nuke.createNode(‘Merge’, inpanel=False)

#create roto
roto1 = nuke.createNode(‘RotoPaint’, inpanel=False)

#input roto as a mask into merge
mergeroto.setInput(0, roto1)

With this, the bg input of the roto gets connected to the merge. It seems like the input wants another index number. Is there a way to set empy inputs? So the bg gets connected to nothing?
I’ve have been searching around here, tutorials and the Python documentation to try and find the answer to this. I know the answer is close.

Thanks so much,
Jackie

No Responses to “merge setInput in python”

Post a Comment