allow unique naming of passed in names on LerpFuncIntervals

This commit is contained in:
Joe Shochet 2006-04-13 05:50:27 +00:00
parent 4631389040
commit 2cf3938811
1 changed files with 7 additions and 0 deletions

View File

@ -622,6 +622,13 @@ class LerpFunctionInterval(Interval.Interval):
name = ('LerpFunctionInterval-%d' %
LerpFunctionInterval.lerpFunctionIntervalNum)
LerpFunctionInterval.lerpFunctionIntervalNum += 1
else:
# Allow the user to pass in a %d in the name and we'll go ahead
# and uniquify the name for them.
if "%d" in name:
name = name % LerpFunctionInterval.lerpFunctionIntervalNum
LerpFunctionInterval.lerpFunctionIntervalNum += 1
# Initialize superclass
Interval.Interval.__init__(self, name, duration)