-
Notifications
You must be signed in to change notification settings - Fork 0
/
scenedown.py
40 lines (38 loc) · 1.54 KB
/
scenedown.py
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
### Scene-down behavior and colors
import constants as cons
import variables as var
class SceneDown():
def __init__(self, data1, data2, mode):
self.data1 = data1
self.data2 = data2
#self.scene = scene
self.mode = mode
def Selection(self): ### Set the DOWN pad to Stop, Solo or Mute.
if self.data1 == cons.scenedown_DATA1:
if self.data2>0:
for x,y in var.scmodes.items():
#print (x, y)
if x == self.mode:
if y == "":
var.scmodes.update({self.mode: "Stop"})
elif y == "Stop":
var.scmodes.update({self.mode: "Solo"})
elif y == "Solo":
var.scmodes.update({self.mode: "Mute"})
elif y == "Mute":
var.scmodes.update({self.mode: ""})
#print (x,y)
return 1
def DownAction(self):
if self.data1 == cons.scenedown_DATA1:
if self.data2:
for x, y in var.scmodes.items():
if x == self.mode:
if y == "Stop":
return "Stop"
elif y == "Solo":
return "Solo"
elif y == "Mute":
return "Mute"
elif y == "":
return ""