-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path8_2_1_WF_PIXELATOR.pyscript
101 lines (82 loc) · 2.01 KB
/
8_2_1_WF_PIXELATOR.pyscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
"""BITS"""
from enveditor import ScriptDialog, Utils
from akscripts.edison.wfwt.wf_pixelator import wf_pixelator
def main():
"""Main function."""
dialog = ScriptDialog("Waveform Pixelator", "Waveform Pixelator")
wt_nr_of_waveforms_choices = [
"1",
"2",
"4",
"8",
"16",
"32",
"64",
"128",
"256",
"512",
"1024",
]
dialog.AddInputCombo(
"Number of waveforms in wave table",
",".join(wt_nr_of_waveforms_choices),
8,
)
wf_horizontal_values_choices = [
"1",
"2",
"4",
"8",
"16",
"32",
"64",
"128",
"256",
"512",
"1024",
]
dialog.AddInputCombo(
"Frame rate",
",".join(wf_horizontal_values_choices),
5,
)
wf_vertical_values_choices = [
"1",
"2",
"4",
"8",
"16",
"32",
"64",
"128",
"256",
"512",
"1024",
]
dialog.AddInputCombo(
"Bit rate",
",".join(wf_vertical_values_choices),
5,
)
if dialog.Execute():
wt_nr_of_waveforms = int(
wt_nr_of_waveforms_choices[
int(dialog.GetInputValue("Number of waveforms in wave table"))
]
)
wf_horizontal_values = int(
wf_horizontal_values_choices[int(dialog.GetInputValue("Frame rate"))]
)
wf_vertical_values = int(
wf_vertical_values_choices[int(dialog.GetInputValue("Bit rate"))]
)
Utils.ShowMessage(
f"Waveform Pixelator\n\nNumber of waveforms in wave table: {wt_nr_of_waveforms}\nFrame rate: {wf_horizontal_values}\nBit rate: {wf_vertical_values}"
)
wf_pixelator(
wt_nr_of_waveforms=wt_nr_of_waveforms,
wf_horizontal_values=wf_horizontal_values,
wf_vertical_values=wf_vertical_values,
)
if __name__ == "__main__":
main()