|
@@ -1073,16 +1073,16 @@ class Fix():
|
|
|
return A,B,C,D
|
|
|
|
|
|
def POS(self,x=None,y=None,a=0,b=0):
|
|
|
- if x is int:
|
|
|
+ if type(x) is int:
|
|
|
self._x=x
|
|
|
- if y is int:
|
|
|
+ if type(y) is int:
|
|
|
self._y=y
|
|
|
|
|
|
A,B,C,D = self._calc(a,b)
|
|
|
|
|
|
return [self._x+A,self._y+B,C,D]
|
|
|
|
|
|
- def subPOS(self,x=0,y=0,a=0,b=0):
|
|
|
+ def XXXsubPOS(self,x=0,y=0,a=0,b=0):
|
|
|
__out = []
|
|
|
for sub_fix in self.sub_fix:
|
|
|
__out.append( sub_fix.POS(x,y,a,b) )
|
|
@@ -1137,9 +1137,9 @@ class SubFix():
|
|
|
return A,B,C,D
|
|
|
|
|
|
def POS(self,x=None,y=None,a=0,b=0):
|
|
|
- if x is int:
|
|
|
+ if type(x) is int:
|
|
|
self._x=x
|
|
|
- if y is int:
|
|
|
+ if type(y) is int:
|
|
|
self._y=y
|
|
|
|
|
|
A,B,C,D = self._calc(a,b)
|
|
@@ -1764,7 +1764,7 @@ def draw_fix_nr(GRID,_x=0,_y=0):
|
|
|
|
|
|
for fix in GRID:
|
|
|
#pos = fix.POS(40,60+pm_wy)
|
|
|
- pos = fix.POS(_x,_y)#+pm_wy)
|
|
|
+ pos = fix.POS() #(_x,_y)#+pm_wy)
|
|
|
rgb = fix.rgb
|
|
|
|
|
|
|
|
@@ -2097,7 +2097,7 @@ def read_dmx_data(ip,ips):
|
|
|
data.extend(data3)
|
|
|
return data
|
|
|
|
|
|
-def set_gobo_pos(GRID,_x=0,_y=0):
|
|
|
+def set_pos(GRID,_x=0,_y=0):
|
|
|
for fix in GRID:
|
|
|
pos = fix.POS(_x,_y)#40,60+pm_wy)
|
|
|
for subfix in fix.sub_fix:
|
|
@@ -2112,7 +2112,9 @@ def draw_gobo(GRID,data,_x=0,_y=0):
|
|
|
v = 1
|
|
|
for fix in GRID:
|
|
|
rgb = fix.rgb
|
|
|
+ pos = fix.POS() #CFG_IN["x1"],CFG_IN["y1"])
|
|
|
|
|
|
+ pygame.draw.rect(window,rgb,pos)
|
|
|
|
|
|
# DRAW SUB-FIXTURE
|
|
|
j = 0
|
|
@@ -2170,7 +2172,7 @@ def grid_label(GRID,_x=0,_y=0):
|
|
|
|
|
|
for fix in GRID:
|
|
|
#pos = fix.POS(_x,_y)
|
|
|
- pos = fix.POS() #(_x,_y)
|
|
|
+ pos = fix.POS() #CFG_IN["x1"],CFG_IN["y1"])
|
|
|
rgb = fix.rgb
|
|
|
|
|
|
# draw row/col grid number
|
|
@@ -2191,6 +2193,7 @@ def grid_sub_label(GRID,_x=0,_y=0):
|
|
|
for fix in GRID:
|
|
|
j = 0
|
|
|
#pos = fix.POS(_x,_y)
|
|
|
+ pos = fix.POS() #CFG_IN["x1"],CFG_IN["y1"])
|
|
|
|
|
|
for subfix in fix.sub_fix:
|
|
|
subfix.dmx_calc(data)
|
|
@@ -2341,7 +2344,8 @@ def main():
|
|
|
|
|
|
|
|
|
pygame.display.flip()
|
|
|
- set_gobo_pos(GRID,_x=CFG_IN["x1"],_y=CFG_IN["y1"])
|
|
|
+ set_pos(GRID,_x=CFG_IN["x1"],_y=CFG_IN["y1"])
|
|
|
+ #set_pos(GRID,600,600)#_x=CFG_IN["x1"],_y=CFG_IN["y1"])
|
|
|
|
|
|
event()
|
|
|
|