Changeset - 5aa7cffe68d0
[Not reviewed]
default
0 1 0
drewp - 21 years ago 2003-07-07 08:45:13

talks dmx
1 file changed with 12 insertions and 0 deletions:
0 comments (0 inline, 0 general)
flax/tracker
Show inline comments
 
#!/usr/bin/python
 
from __future__ import division,nested_scopes
 

	
 
import sys
 
sys.path.append("../../editor/pour")
 
sys.path.append("../light8")
 

	
 
from Submaster import Submaster
 
from skim.zooming import Zooming,Pair
 
from math import sqrt,sin,cos
 
from pygame.rect import Rect
 
from xmlnodebase import xmlnodeclass,collectiveelement,xmldocfile
 
import dispatcher
 

	
 
import dmxclient
 

	
 
import Tkinter as tk
 

	
 
defaultfont="arial 8"
 

	
 
def pairdist(pair1,pair2):
 
    return sqrt((pair1[0]-pair2[0])**2+(pair1[1]-pair2[1])**2)
 
@@ -70,12 +74,20 @@ class Fieldset(collectiveelement):
 
            intens=f.calc(x,y)
 
            if intens>0:
 
                print name,intens,
 
                active+=1
 
        if active>0:
 
            print
 
        self.dmxsend(x,y)
 
    def dmxsend(self,x,y):
 
        """output lights to dmx"""
 
        levels=dict([(f.name(),f.calc(x,y)) for f in self.getall()])
 
        dmxlist=Submaster(None,levels).get_dmx_list()
 
        dmxclient.outputlevels(dmxlist)
 
        
 
        
 
    def getbounds(self):
 
        """returns xmin,xmax,ymin,ymax for the non-zero areas of this field"""
 
        r=None
 
        for f in self.getall():
 
            rad=f.getdistforintensity(0)
 
            fx,fy=f.center()
0 comments (0 inline, 0 general)