Mercurial > code > home > repos > light9
comparison flax/Timeline.py @ 139:83e2c4ceb79a
KeyboardComposer: let's get it working again
KeyboardComposer: let's get it working again
TheShow: get_timelines method
Timeline: it's late, okay?
TimelineDMX: timeline selector, basically copied from that music player
thing
author | dmcc |
---|---|
date | Sat, 14 Jun 2003 16:19:40 +0000 |
parents | 304152488ed7 |
children | 851cf44cea40 |
comparison
equal
deleted
inserted
replaced
138:304152488ed7 | 139:83e2c4ceb79a |
---|---|
166 self._cleaup_events() | 166 self._cleaup_events() |
167 def _cleaup_events(self): | 167 def _cleaup_events(self): |
168 """This makes sure all events are in the right order and have defaults | 168 """This makes sure all events are in the right order and have defaults |
169 filled in if they have missing frames.""" | 169 filled in if they have missing frames.""" |
170 self.events.sort() | 170 self.events.sort() |
171 self.fill_in_missing frames() | 171 self.fill_in_missing_frames() |
172 def add_event(self, event): | 172 def add_event(self, event): |
173 """Add a TimedEvent object to this TimelineTrack""" | 173 """Add a TimedEvent object to this TimelineTrack""" |
174 self.events.append(event) | 174 self.events.append(event) |
175 self._cleaup_events(self.events) | 175 self._cleaup_events(self.events) |
176 def delete_event(self, event): | 176 def delete_event(self, event): |
186 is optional.""" | 186 is optional.""" |
187 endtime = endtime or starttime | 187 endtime = endtime or starttime |
188 self.events = [e for e in self.events | 188 self.events = [e for e in self.events |
189 if e.time >= starttime and e.time <= endtime] | 189 if e.time >= starttime and e.time <= endtime] |
190 self._cleaup_events(self.events) | 190 self._cleaup_events(self.events) |
191 def fill_in_missing frames(self): | 191 def fill_in_missing_frames(self): |
192 """Runs through all events and sets TimedEvent with missing frames to | 192 """Runs through all events and sets TimedEvent with missing frames to |
193 the default frame.""" | 193 the default frame.""" |
194 for event in self.events: | 194 for event in self.events: |
195 if event.frame == MISSING: | 195 if event.frame == MISSING: |
196 event.frame = self.default_frame | 196 event.frame = self.default_frame |