1 import nuke
2 from PySide2.QtCore import Qt
3 from PySide2.QtWidgets import (QWidget,
4 QSplitter,
5 QVBoxLayout)
6 from blinkscripteditor import *
7
9
10 doNotUpdate = False
11
13 super(ScriptEditor, self).__init__(parent)
14
15 self.knob = knob
16
17 self.doNotUpdate = False
18
19
20 self.setWindowTitle("BlinkScript Editor")
21
22
23 splitter = QSplitter(Qt.Vertical)
24
25
26 self.myTextWindow = ScriptInputArea(None, self, self)
27 splitter.addWidget(self.myTextWindow)
28
29 layout = QVBoxLayout()
30 self.setLayout(layout)
31 layout.addWidget(splitter)
32
33
34 self.myTextWindow.userChangedEvent.connect(self.storeTextOnKnob)
35
36 - def printText(self):
37 data = self.myTextWindow.toPlainText()
38 print str(data)
39
41 data = self.myTextWindow.toPlainText()
42 return data
43
45 self.doNotUpdate = True
46 self.knob.setText(self.myTextWindow.toPlainText())
47
55
62
63
66