Hey Howard,

Try the following:

nodes = nuke.selectedNodes()


input_number = 0


for n in nuke.allNodes():


n['selected'].setValue(False)


for node in nodes:


node['selected'].setValue(True)

dot = nuke.createNode('Dot')


apnd = nuke.createNode('AppendClip')


dots = nuke.allNodes('Dot')

print dots


for dot in dots:


print input_number


apnd.setInput(input_number, dot)


input_number+=1


if that doen't work give me a shout,


Best,

Matheus


2016-09-21 15:53 GMT+01:00 Howard Jones <how...@axis-vfx.com>:

> Hi
>
> With this code below I am hoping to attach a series of dots to an
> appendclip in order of selection.
> Instead what I get is the appendClip attaching its inputs to just the last
> dot.
>
> If I have 4 read nodes selected for example I get 4 dots but all 4 of the
> appendClip’s inputs attached to the last dot.
>
> (Nuke 10.3)
>
> Any help appreciated, I know I’m being thick.
> *Howard*
>
> sn=nuke.selectedNodes()
>
> apnd=nuke.nodes.AppendClip()
>
>
> for n in nuke.allNodes():
>
> n['selected'].setValue(False)
>
>
>
> inNum=0
>
> for i in sn[::-1]:
>
> print inNum
>
> i['selected'].setValue(True)
>
> a=nuke.createNode('Dot', inpanel=False)
>
> apnd.setInput(inNum,a)
>
> inNum+=1
>
>
>
> *A X I S V F X*
>
> The Bottle Yard Studios
>
> Whitchurch Lane
>
> Bristol BS14 0BH
>
>
>
> axis-vfx.com
>
> _______________________________________________
> 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