Actually this works better for me. It appears I need to create the dot - then connect it. Then the append seems to work. If anyone knows why this is I’d be intrigued to know.
sn=nuke.selectedNodes() apnd=nuke.nodes.AppendClip() for a in nuke.allNodes(): a['selected'].setValue(False) inNum=0 for i in sn[::-1]: print inNum i['selected'].setValue(True) i['label'].setValue('[value first] - [value last]') i['selected'].setValue(True) a=nuke.nodes.Dot() a.setXYpos(i.xpos(), i.ypos()+200) a.setInput(0,i) apnd.setInput(inNum,a) inNum+=1 Howard Jones Visual Effects Supervisor m: 07973 265624 | e: how...@axis-vfx.com | w: www.axis-vfx.com > On 21 Sep 2016, at 17:19, Howard Jones <how...@axis-vfx.com> wrote: > > Thanks Matheus > > That does work , I had a similar test work by reiterating through sn. > Though I can’t see what was wrong with the previous code, as each dot was > unique along with the input number on each loop. > I guess I would need to build a list for each dot so I don’t trawl the entire > scripts or dots, so I can use yours in principle. > > Thanks again > Howard Jones > Visual Effects Supervisor > m: 07973 265624 | e: how...@axis-vfx.com <mailto:how...@axis-vfx.com> | w: > www.axis-vfx.com <http://www.axis-vfx.com/> >> On 21 Sep 2016, at 16:42, matheus marques <matheusmadog...@gmail.com >> <mailto:matheusmadog...@gmail.com>> wrote: >> >> 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 > -- *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