[pitivi: 2/12] timeline.py: add getObjsInRegion() method
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi: 2/12] timeline.py: add getObjsInRegion() method
- Date: Tue, 1 Dec 2009 22:01:27 +0000 (UTC)
commit 852c3901653900f4097401e714505984b041f500
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Wed Nov 25 10:46:08 2009 -0800
timeline.py: add getObjsInRegion() method
pitivi/timeline/timeline.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index a12c7f3..caabf10 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1850,3 +1850,15 @@ class Timeline(Signallable, Loggable):
def getObjsBeforeTime(self, target):
return [to for to in self.timeline_objects
if to.start + to.duration <=target]
+
+ def getObjsInRegion(self, start, end, min_priority=0,
+ max_priority=4294967295L):
+ objs = []
+ for to in self.timeline_objects:
+ if ((to.start >= start) and
+ ((to.start + to.duration) <= end) and
+ (to.priority >= min_priority) and
+ (to.priority <= max_priority)):
+ objs.append(to)
+ return objs
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]