Nuke Temp

From bernie's
Jump to: navigation, search

Mikros dots temp

s = nuke.selectedNodes() counter = -1 pos = [0,0] dots = []

  1. dots are super 'sticky' need to remove selection

for node in nuke.allNodes(recurseGroups=True):

   node['selected'].setValue(False)

for n in reversed(s):

   counter += 1
   dot=nuke.createNode('Dot')
   dot.setInput(0, n)
   if counter == 0:
       #dot.autoplace()
       pos = [dot['xpos'].value(),dot['ypos'].value()]
       x = int(pos[0])
       y = int(pos[1])
       dot.setXYpos(x,y)
   else:
       x = int(pos[0]+counter*30)
       y = int(pos[1])
       dot.setXYpos(x,y)
   dot.knob('label').setValue(n.name())
   dots.append(dot)

for d in dots:

   d['selected'].setValue(True)