Files @ 79bc84310e80
Branch filter:

Location: light9/NodeType.py

dmcc
changes from tonight's rehearsal:
changes from tonight's rehearsal:
- CueFader is closer to actually running the show, computes DMX levels
to send.
- KeyboardComposer is not a dummy. Use DMXDUMMY=1 to disable it.
- Submaster: subs can now be "temporary" -- i.e. they shouldn't be saved
or loaded. to save a temporary sub, make a copy of it with a proper name
since the computed name will be ugly.
Also, get_normalized_copy() and crossfade() methods added.
linear_fade helper (shouldn't be in Submaster, probably) added too.
- dmxchanedit: longer labels
- cuelist1 now has some bogus data in it and some crap removed
- dmxclient: now listens to the $DMXHOST and $DMXDUMMY env variables.
- patchdata: now up to date with this year's show
- danshow subs song{01..19}: removed. maybe we'll re-add them in an
archive directory.
"""each node descends from this base class"""

class NodeType:
    def __init__(self):
        """TBD"""
        self.ops = Ops()

        ''' maybe
        self.iports = []
        self.oports = []
        self.params = []
        '''
    def get_state(self, stateaccess):
        """This is similar to the pickle.__getstate__ method, except
        we need this alternate version in order to give the node
        (which holds no state) access to its instance's state.

        If your node keeps some transient items in its state dict
        (such as a buffer of recently received inputs), it may want to
        return a copy of the state dict without those items. set_state
        should restore them properly (if they're missing from the
        current state, which they might not be).

        get_state might be called at any time, and it's certainly not
        guaranteed that the node instance is going out of service.
        get_state might get called to checkpoint the nodes for a
        backup, for example. set_state might also get called anytime.
        """
        return stateaccess
    def set_state(self, stateaccess, dict):
        """dict (named after the pickle.__setstate__ argument) is
        always a value that was previously returned from
        get_state. Don't adjust the current nodetype's state, of course;
        use dict to update stateaccess.  If there were elements
        missing from dict (see the note in get_state for why this
        might be the case), you should restore them here as
        appropriate.
        """        
        stateaccess.update(dict)
    def get_default_params(self):
        '''Returns dictionary of param names and DataType instances.  DataTypes 
        can be given values'''
        return {}
    def get_default_ports(self):
        '''Returns pinless port objects'''
        return {}