Guest User

Untitled

a guest
Apr 23rd, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. import nuke
  2. import nukescripts
  3.  
  4. class tmpPanel(nukescripts.PythonPanel):
  5.  
  6.     def __init__(self):
  7.  
  8.         nukescripts.PythonPanel.__init__(self, "tmp panel")
  9.         self.writes = nuke.Enumeration_Knob("writes", "writes", ["Write1", "Write2"])
  10.         self.render = nuke.PyScript_Knob("render", "render")
  11.  
  12.         for i in [self.writes, self.render]:
  13.             self.addKnob(i)
  14.  
  15.     def knobChanged(self, knob):
  16.         if knob is self.render:
  17.             self.renderWrites()
  18.  
  19.     def renderWrites(self):
  20.  
  21.         writeNode = self.writes.value()
  22.  
  23.         nuke.execute(nuke.toNode(writeNode), 1, 5, 1)
  24.  
  25. tmpPanel().show()
Advertisement
Add Comment
Please, Sign In to add comment