view flax/Ports.py @ 124:8de8a2f467db

The "T" function now creates TimedEvents with LinearBlenders for you The "T" function now creates TimedEvents with LinearBlenders for you (using the same LinearBlender). Thus, we don't need to specify linear anymore. The timeline seek bar was reading the length of track1 instead of the whole timeline. This is fixed.
author dmcc
date Fri, 13 Jun 2003 15:55:54 +0000
parents 45b12307c695
children
line wrap: on
line source

# super rough code

class AbstractPort:
    def __init__(self):
        pass
    def put_data(self, value):
        pass
    def get_data(self):
        pass

class Port(AbstractPort):
    "Connects from a node to exactly one node."
    def __init__(self, value=None):
        AbstractPort.__init__(self)
        self.value = value
    def put_data(self, value):
        self.value = value
    def get_data(self):
        return self.value

class MultiPort(AbstractPort):
    "Connects from a node to any number of nodes."
    def __init__(self, values=None):
        AbstractPort.__init__(self)
        self.values = values
    def put_data(self, values):
        self.values = values
    def get_data(self):
        return self.values