Exemplo n.º 1
0
    def __init__(self, dirtyTarget, xagent, render, opt = {}):
        
        EventManager.__init__(self)
        DrawAgentBasic.__init__(self, xagent, render, opt)
        
        render.globalOpt = opt
        render.localOpt = {}
        render.define = xagent.define
    
        self.xagent = xagent
        self.passes = []
        self.passname = {}
        self.opt = opt
        self.dirtyTarget = None
        self.define = xagent.define
        
        if dirtyTarget:
            self.dirtyTarget = ref(dirtyTarget)
                
        self.width = float(self.trans(xagent.width))
        self.height = float(self.trans(xagent.height))
        self.fit = self.trans(xagent.fit)
        
        self.anims = {}
        self.localanim = []
        self.passlist = [i.strip() for i in xagent.default.split(',')]
        self.waitNext = False

        # create global anim
        for i in xagent.anims:
            r = self.createAnim(self.xagent, render, i)
            for name, isglobal, anim in r:
                self.anims[name] = anim
                if not isglobal:
                    self.localanim.append(anim)
            pass
        
        for i in xagent.passes:
            self.passes.append(DrawPass(self, i, render, opt))
            self.passname[self.passes[-1].name] = self.passes[-1]
        
        self._apply([i.strip() for i in xagent.default.split(',')])
        
        render.globalOpt = {}
        render.localOpt = {}
        render.define = {}
Exemplo n.º 2
0
 def __init__(self, parent):
     EventManager.__init__(self)
     self.animatom = None
     self._parent = ref(parent)
     self.run = None
Exemplo n.º 3
0
 def free(self):
     self.onStopScroll()
     self._parent = None
     EventManager.clear(self)