From 2cf39388119ecacacabccabc4e44a5814ea55374 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Thu, 13 Apr 2006 05:50:27 +0000 Subject: [PATCH] allow unique naming of passed in names on LerpFuncIntervals --- direct/src/interval/LerpInterval.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/direct/src/interval/LerpInterval.py b/direct/src/interval/LerpInterval.py index ee7ebd167e..81f4b86830 100644 --- a/direct/src/interval/LerpInterval.py +++ b/direct/src/interval/LerpInterval.py @@ -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)