You would basically collect all the merge nodes in a list in that interate through that list:

mergeList = nuke.selectedNodes()
for m in mergeList:
    nuke.selectAll()

nuke.invertSelection()

    m['selected'].setValue(True)
    nuke.createNode('Crop')

Something like this should do it

Greets



Am 18.04.2015 um 13:05 schrieb Tejas Kantharia:
hi,
i want to create a crop node for the selected merge nodes but the problem i'm having is all crop nodes are created when the first merge node is found. is there any way to solve it ? to create a crop node after every merge node .
Thanks,
Tejas


_______________________________________________
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

_______________________________________________
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