Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import nuke
- import nukescripts
- import threading
- class tmpPanel(nukescripts.PythonPanel):
- def __init__(self):
- nukescripts.PythonPanel.__init__(self, "tmp panel")
- self.writes = nuke.Enumeration_Knob("writes", "writes", [node.name() for node in self.getWrites()])
- self.render = nuke.PyScript_Knob("render", "render")
- for i in [self.writes, self.render]:
- self.addKnob(i)
- def knobChanged(self, knob):
- if knob is self.render:
- self.renderWrites()
- def renderWrites(self):
- writeNode = self.writes.value()
- node = nuke.toNode(writeNode)
- threading.Thread(target = nuke.execute, args= (node , 1, 5, 1)).start()
- def getWrites(self):
- return (node for node in nuke.allNodes() if node.Class() == "Write")
- tmpPanel().show()
Advertisement
Add Comment
Please, Sign In to add comment