From d56ac3776f903c50ab0c0197da1e72b1f100a27a Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 19 Jun 2003 17:01:27 +0000 Subject: [PATCH] add __add__ --- direct/src/interval/MetaInterval.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/direct/src/interval/MetaInterval.py b/direct/src/interval/MetaInterval.py index 5e621f285b..e544c8aa3c 100644 --- a/direct/src/interval/MetaInterval.py +++ b/direct/src/interval/MetaInterval.py @@ -174,7 +174,7 @@ class MetaInterval(CMetaInterval): def __getslice__(self, i, j): if isinstance(self.ivals, types.TupleType): self.ivals = list(self.ivals) - return self.ivals[i : j] + return self.__class__(self.ivals[i : j]) def __setslice__(self, i, j, s): if isinstance(self.ivals, types.TupleType): @@ -198,6 +198,11 @@ class MetaInterval(CMetaInterval): self.__ivalsDirty = 1 return self + def __add__(self, other): + copy = self[:] + copy += other + return copy + # Functions to define sequence, parallel, and track behaviors: def addSequence(self, list, name, relTime, relTo, duration):