make negative playRate implicitly play animation backwards

This commit is contained in:
David Rose 2003-11-14 09:48:01 +00:00
parent 77e7c30ab4
commit 4d37f8fe6d
1 changed files with 4 additions and 2 deletions

View File

@ -89,8 +89,10 @@ class ActorInterval(Interval.Interval):
maxFrames = max(maxFrames, numFrames)
self.endFrame = maxFrames - 1
# Must we play the animation backwards?
self.reverse = 0
# Must we play the animation backwards? We play backwards if
# either (or both) of the following is true: the playRate is
# negative, or endFrame is before startFrame.
self.reverse = (playRate < 0)
if self.endFrame < self.startFrame:
self.reverse = 1
t = self.endFrame