|
@@ -418,10 +418,6 @@ class MC():
|
|
|
except Exception as e:
|
|
|
cprint("-- Exception",e)
|
|
|
|
|
|
- # def init(self):
|
|
|
- data = {}
|
|
|
- start = time.time()
|
|
|
- delta = start
|
|
|
index = self.mc.get("index")
|
|
|
if index:
|
|
|
for i in index:
|
|
@@ -495,7 +491,6 @@ class MC():
|
|
|
print("IP:",ip)
|
|
|
#input()
|
|
|
while 1:
|
|
|
- send = 0
|
|
|
#print("+")
|
|
|
try:
|
|
|
#ip="10.10.10.13:0"
|
|
@@ -563,6 +558,7 @@ def jclient_send(data):
|
|
|
jdatas.append(jdata)
|
|
|
except Exception as e:
|
|
|
cprint("jclient_send, Exception DMX ",color="red")
|
|
|
+ cprint("",e,color="red")
|
|
|
cprint("",jdata,color="red")
|
|
|
cprint("-----",color="red")
|
|
|
|
|
@@ -608,6 +604,7 @@ def jclient_send(data):
|
|
|
cprint(e,color="red")
|
|
|
#pt Exception as e:
|
|
|
exc_type, exc_obj, exc_tb = sys.exc_info()
|
|
|
+ _ = exc_obj
|
|
|
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
|
|
print(exc_type, fname, exc_tb.tb_lineno)
|
|
|
cprint("-----",color="red")
|
|
@@ -648,7 +645,7 @@ def _highlight(fix,_attr="DIM"):
|
|
|
data["DMX"] = DMX + ATTR[attr]["NR"]-1
|
|
|
cprint(attr,ATTR[attr])
|
|
|
cprint(data)
|
|
|
- for i in range(3):
|
|
|
+ for _ in range(3):
|
|
|
cprint("highlight",fix,"0")
|
|
|
data["VALUE"] = 100
|
|
|
jclient_send([data])
|
|
@@ -802,10 +799,7 @@ def save_show_to_usb():
|
|
|
usb = usb.strip()
|
|
|
print(usb)
|
|
|
|
|
|
- cwd = os.getcwd()
|
|
|
-
|
|
|
_show_name = showlib.current_show_name()
|
|
|
- #_usbstick_path = "/media/user/"+str(usb)+"/LibreLight/show/"
|
|
|
_usbstick_path = ""+str(usb)+"/LibreLight/show/"
|
|
|
SHOW_DIR = libwin.showlib.SHOW_DIR
|
|
|
|
|
@@ -889,8 +883,6 @@ class cb():
|
|
|
def __init__(self,win):
|
|
|
self.win = win
|
|
|
def _callback(self,event):
|
|
|
- clobj=event.widget
|
|
|
- ## undermouse=find_withtag(master.CURRENT)
|
|
|
undermouse=self.win.find_closest(self.win.CURRENT)
|
|
|
cprint( repr(undermouse))
|
|
|
def callback(self,event):
|
|
@@ -1050,8 +1042,6 @@ class MASTER():
|
|
|
|
|
|
for i in range(8*8*8):
|
|
|
if i not in EXEC.val_exec:
|
|
|
- name = "Preset:"+str(i+1)+":\nXYZ"
|
|
|
- #self.exec[i] = [i]
|
|
|
EXEC.val_exec[i] = OrderedDict() # FIX
|
|
|
EXEC.val_exec[i]["CFG"] = OrderedDict() # CONFIG
|
|
|
EXEC.label_exec[i] = "-"
|
|
@@ -1096,8 +1086,7 @@ class MASTER():
|
|
|
# buffer nr
|
|
|
def _cb(data):
|
|
|
cfg = EXEC._btn_cfg(nr)
|
|
|
- button = EXEC.btn_cfg(nr)
|
|
|
- label = EXEC.label(nr)
|
|
|
+
|
|
|
if not data:
|
|
|
cprint("err443",self,"_cb",data)
|
|
|
return None
|
|
@@ -1119,7 +1108,7 @@ class MASTER():
|
|
|
txt = float(txt)
|
|
|
if "DELAY" in cfg:
|
|
|
cfg["DELAY"] = round(txt,2)
|
|
|
- except e as Exception:
|
|
|
+ except Exception as e:
|
|
|
print("DELAY Exception",e)
|
|
|
|
|
|
if "in-Fade" in data and type(data["in-Fade"]) is str:
|
|
@@ -1128,7 +1117,7 @@ class MASTER():
|
|
|
txt = float(txt)
|
|
|
if "FADE" in cfg:
|
|
|
cfg["FADE"] = round(txt,2)
|
|
|
- except e as Exception:
|
|
|
+ except Exception as e:
|
|
|
print("in-Fade Exception",e)
|
|
|
|
|
|
if "out-Fade" in data and type(data["out-Fade"]) is str:
|
|
@@ -1136,7 +1125,7 @@ class MASTER():
|
|
|
try:
|
|
|
txt = float(txt)
|
|
|
cfg["OUT-FADE"] = round(txt,2)
|
|
|
- except e as Exception:
|
|
|
+ except Exception as e:
|
|
|
print("out-Fade Exception",e)
|
|
|
|
|
|
modes.val("CFG-BTN",0)
|
|
@@ -1216,15 +1205,13 @@ class MASTER():
|
|
|
refresher_exec.reset() # = tkrefresh.Refresher()
|
|
|
|
|
|
def _refresh_exec(self,nr=-1):
|
|
|
- s = time.time()
|
|
|
cprint("EXEC.refresh_exec()")
|
|
|
refresher_exec.reset() # = tkrefresh.Refresher()
|
|
|
|
|
|
self._XX +=1
|
|
|
self._nr_ok = 0
|
|
|
- ERR=""
|
|
|
for nr in EXEC.val_exec:
|
|
|
- cfg = get_exec_btn_cfg(nr)
|
|
|
+ get_exec_btn_cfg(nr)
|
|
|
time.sleep(0.01)
|
|
|
|
|
|
def refresh_fix(self):
|
|
@@ -1232,19 +1219,12 @@ class MASTER():
|
|
|
self._refresh_fix_menu()
|
|
|
def _refresh_fix_menu(self):
|
|
|
#cprint("_refresh_fix_menu")
|
|
|
- s=time.time(); _XXX=0
|
|
|
|
|
|
menu_buff = {"DIM":0,"DIM-SUB":0,"FIX":0,"FIX-SUB":0}
|
|
|
|
|
|
- elem_buffer = []
|
|
|
-
|
|
|
for fix in FIXTURES.fixtures:
|
|
|
sdata = FIXTURES.fixtures[fix]
|
|
|
|
|
|
- elem_attr_fix = None
|
|
|
- if fix in self.elem_attr:
|
|
|
- elem_attr_fix = self.elem_attr[fix]
|
|
|
-
|
|
|
if "DIM" in sdata["ATTRIBUT"] and "_ACTIVE" in sdata["ATTRIBUT"] and len(sdata["ATTRIBUT"]) == 2:
|
|
|
KEY = "DIM-SUB"
|
|
|
else:
|
|
@@ -1460,7 +1440,7 @@ class MASTER():
|
|
|
modes.val("REC-FX",0)
|
|
|
modes.val("REC",0)
|
|
|
|
|
|
- cfg = get_exec_btn_cfg(nr)
|
|
|
+ _ = get_exec_btn_cfg(nr)
|
|
|
#master._refresh_exec()
|
|
|
return 1
|
|
|
def exec_edit(self,nr):
|
|
@@ -1476,7 +1456,6 @@ class MASTER():
|
|
|
def exec_select(self,nr):
|
|
|
cprint("Master.exec_select","-- EXEC SELECT ------------------------------")
|
|
|
sdata = EXEC.val_exec[nr]
|
|
|
- cmd = ""
|
|
|
for fix in sdata:
|
|
|
if fix == "CFG":
|
|
|
continue
|
|
@@ -1492,7 +1471,6 @@ class MASTER():
|
|
|
#elem["bg"] = "yellow"
|
|
|
|
|
|
def exec_go(self,nr,val=None,xfade=None,event=None,button="",ptfade=None):
|
|
|
- s=time.time()
|
|
|
t_start = time.time()
|
|
|
if xfade is None and meta.FADE._is():
|
|
|
xfade = meta.FADE.val()
|
|
@@ -1547,11 +1525,7 @@ class MASTER():
|
|
|
self._exec_go(rdata,cfg,fcmd,value,xfade=0,xFLASH=xFLASH)
|
|
|
elif button == "go" or ( modes.val("GO") or ( "BUTTON" in cfg and cfg["BUTTON"] in ["go","GO"])):
|
|
|
fcmd = FIXTURES.update_raw(rdata)
|
|
|
- e=time.time()
|
|
|
- #print("_GO TIME:","{:0.02f}".format(e-s),int(e*10)/10)
|
|
|
self._exec_go(rdata,cfg,fcmd,value,xfade=xfade,xFLASH=xFLASH,ptfade=ptfade,nr=nr)
|
|
|
- e=time.time()
|
|
|
- #print("GO TIME:","{:0.02f}".format(e-s),int(e*10)/10)
|
|
|
return
|
|
|
|
|
|
if not (modes.val("FLASH") or ( "BUTTON" in cfg and cfg["BUTTON"] == "FL")): #FLASH
|
|
@@ -1578,8 +1552,7 @@ class MASTER():
|
|
|
vcmd = execlib.reshape_exec( rdata ,value,xfade=xfade,ptfade=ptfade,DELAY=xdelay)
|
|
|
|
|
|
cmd = []
|
|
|
- delay=0
|
|
|
- for i,v in enumerate(fcmd):
|
|
|
+ for i,_ in enumerate(fcmd):
|
|
|
#print("go",i,v)
|
|
|
if xFLASH:
|
|
|
vcmd[i]["FLASH"] = 1
|
|
@@ -1744,11 +1717,6 @@ class WindowManager():
|
|
|
if cb_ok:
|
|
|
cb_ok()
|
|
|
|
|
|
- resize = 1
|
|
|
- if "resize" in c.args:
|
|
|
- if not c.args["resize"]:
|
|
|
- resize = 0
|
|
|
- #if resize:
|
|
|
libwin.get_cur_window_geo(_filter=name,win=w)
|
|
|
|
|
|
if name in ["ENCODER"]:
|
|
@@ -1911,10 +1879,9 @@ def mc_fix_loop():
|
|
|
while 1:
|
|
|
try:
|
|
|
if c >= 1:
|
|
|
- #master._refresh_exec()
|
|
|
c=0
|
|
|
for nr in EXEC.val_exec:
|
|
|
- cfg = get_exec_btn_cfg(nr)
|
|
|
+ get_exec_btn_cfg(nr)
|
|
|
except Exception as e:
|
|
|
print("MC_FIX EXCEPTION",e)
|
|
|
#raise e
|