diff --git a/direct/src/interval/ActorInterval.py b/direct/src/interval/ActorInterval.py index 1cdcef3c20..f1287cfba1 100644 --- a/direct/src/interval/ActorInterval.py +++ b/direct/src/interval/ActorInterval.py @@ -1,12 +1,12 @@ """ActorInterval module: contains the ActorInterval class""" from PandaModules import * -from Interval import * +import Interval import math import DirectNotifyGlobal -class ActorInterval(Interval): +class ActorInterval(Interval.Interval): # create ActorInterval DirectNotify category notify = directNotify.newCategory('ActorInterval') @@ -59,7 +59,7 @@ class ActorInterval(Interval): reverse = 1 # Initialize superclass - Interval.__init__(self, name, duration, reverse=reverse) + Interval.Interval.__init__(self, name, duration, reverse=reverse) # Update stopEvent self.stopEvent = id + '_stopEvent' if self.loopAnim: @@ -92,7 +92,7 @@ class ActorInterval(Interval): (self.name,frame)) return frame - def updateFunc(self, t, event=IVAL_NONE): + def updateFunc(self, t, event=Interval.IVAL_NONE): """ updateFunc(t, event) Go to time t """ @@ -111,7 +111,7 @@ class ActorInterval(Interval): 'updateFunc() - %s stoping at frame: ' % self.name + '%d Num frames: %d' % (frame, self.numFrames)) elif self.loopAnim == 1: - if event == IVAL_INIT: + if event == Interval.IVAL_INIT: # Pose anim self.goToT(t) # And start loop, restart flag says continue from current frame diff --git a/direct/src/interval/FunctionInterval.py b/direct/src/interval/FunctionInterval.py index 1f86616fa8..7048f5c6b5 100644 --- a/direct/src/interval/FunctionInterval.py +++ b/direct/src/interval/FunctionInterval.py @@ -1,8 +1,8 @@ """FunctionInterval module: contains the FunctionInterval class""" from PandaModules import * -from Interval import * from MessengerGlobal import * +import Interval import types ############################################################# @@ -11,7 +11,7 @@ import types ### ### ############################################################# -class FunctionInterval(Interval): +class FunctionInterval(Interval.Interval): # Name counter functionIntervalNum = 1 @@ -36,9 +36,9 @@ class FunctionInterval(Interval): # function to be called. If false, IVAL_INIT calls have no effect # Event, Accept, Ignore intervals default to fOpenEnded = 0 # Parent, Pos, Hpr, etc intervals default to fOpenEnded = 1 - Interval.__init__(self, name, duration = 0.0, openEnded = openEnded) + Interval.Interval.__init__(self, name, duration = 0.0, openEnded = openEnded) - def updateFunc(self, t, event = IVAL_NONE): + def updateFunc(self, t, event = Interval.IVAL_NONE): """ updateFunc(t, event) Go to time t """ diff --git a/direct/src/interval/Interval.py b/direct/src/interval/Interval.py index 8ddf8086d9..fc7ef49249 100644 --- a/direct/src/interval/Interval.py +++ b/direct/src/interval/Interval.py @@ -1,7 +1,6 @@ """Interval module: contains the Interval class""" from DirectObject import * -from IntervalGlobal import * from PandaModules import * import Task diff --git a/direct/src/interval/LerpInterval.py b/direct/src/interval/LerpInterval.py index 93237fc988..e07c29d9b3 100644 --- a/direct/src/interval/LerpInterval.py +++ b/direct/src/interval/LerpInterval.py @@ -1,11 +1,10 @@ """LerpInterval module: contains the LerpInterval class""" -from Interval import * from PandaModules import * - +import Interval import LerpBlendHelpers -class LerpInterval(Interval): +class LerpInterval(Interval.Interval): # create LerpInterval DirectNotify category notify = directNotify.newCategory('LerpInterval') # Class methods @@ -17,13 +16,13 @@ class LerpInterval(Interval): self.functorFunc = functorFunc self.blendType = self.getBlend(blendType) # Initialize superclass - Interval.__init__(self, name, duration) + Interval.Interval.__init__(self, name, duration) - def updateFunc(self, t, event = IVAL_NONE): + def updateFunc(self, t, event = Interval.IVAL_NONE): """ updateFunc(t, event) """ # Check to see if we need to create the lerp - if (event == IVAL_INIT): + if (event == Interval.IVAL_INIT): self.lerp = Lerp(self.functorFunc(), self.duration, self.blendType) # Make sure lerp exists @@ -319,9 +318,9 @@ class LerpFunctionInterval(Interval): LerpFunctionInterval.lerpFunctionIntervalNum) LerpFunctionInterval.lerpFunctionIntervalNum += 1 # Initialize superclass - Interval.__init__(self, name, duration) + Interval.Interval.__init__(self, name, duration) - def updateFunc(self, t, event = IVAL_NONE): + def updateFunc(self, t, event = Interval.IVAL_NONE): """ updateFunc(t, event) """ # Evaluate the function diff --git a/direct/src/interval/MopathInterval.py b/direct/src/interval/MopathInterval.py index 128c46c3e0..7738a058e8 100644 --- a/direct/src/interval/MopathInterval.py +++ b/direct/src/interval/MopathInterval.py @@ -1,10 +1,10 @@ """MopathInterval module: contains the MopathInterval class""" -from Interval import * +import Interval # import Mopath -class MopathInterval(Interval): +class MopathInterval(Interval.Interval): # Name counter mopathNum = 1 # create MopathInterval DirectNotify category @@ -22,9 +22,9 @@ class MopathInterval(Interval): # Compute duration duration = self.mopath.getMaxT() # Initialize superclass - Interval.__init__(self, name, duration) + Interval.Interval.__init__(self, name, duration) - def updateFunc(self, t, event = IVAL_NONE): + def updateFunc(self, t, event = Interval.IVAL_NONE): """ updateFunc(t, event) Go to time t """ diff --git a/direct/src/interval/ParticleInterval.py b/direct/src/interval/ParticleInterval.py index 4290f0beab..12c325a799 100644 --- a/direct/src/interval/ParticleInterval.py +++ b/direct/src/interval/ParticleInterval.py @@ -1,11 +1,11 @@ """ParticleInterval module: contains the ParticleInterval class""" from PandaModules import * -from Interval import * +import Interval import ParticleEffect -class ParticleInterval(Interval): +class ParticleInterval(Interval.Interval): # Name counter particleNum = 1 # create ParticleInterval DirectNotify category @@ -27,13 +27,13 @@ class ParticleInterval(Interval): self.loop = loop assert(duration > 0.0 or loop == 1) # Initialize superclass - Interval.__init__(self, name, duration) + Interval.Interval.__init__(self, name, duration) # Update stopEvent self.stopEvent = id + '_stopEvent' self.stopEventList = [self.stopEvent] self.cleanedUp = 0 - def updateFunc(self, t, event=IVAL_NONE): + def updateFunc(self, t, event=Interval.IVAL_NONE): """ updateFunc(t, event) Go to time t """ @@ -46,7 +46,7 @@ class ParticleInterval(Interval): ParticleEffect.cleanupParticleEffect(self.particleEffect) self.ignore(self.stopEvent) self.cleanedUp = 1 - elif (event == IVAL_INIT): + elif (event == Interval.IVAL_INIT): # IVAL_INIT event, start new particle effect ParticleEffect.startParticleEffect(self.particleEffect, self.parent, self.worldRelative) diff --git a/direct/src/interval/SoundInterval.py b/direct/src/interval/SoundInterval.py index 6d623e65bc..7366287b3f 100644 --- a/direct/src/interval/SoundInterval.py +++ b/direct/src/interval/SoundInterval.py @@ -1,9 +1,9 @@ """SoundInterval module: contains the SoundInterval class""" from PandaModules import * -from Interval import * +import Interval -class SoundInterval(Interval): +class SoundInterval(Interval.Interval): # Name counter soundNum = 1 # create SoundInterval DirectNotify category @@ -42,12 +42,12 @@ class SoundInterval(Interval): if (name == None): name = id # Initialize superclass - Interval.__init__(self, name, duration) + Interval.Interval.__init__(self, name, duration) # Update stopEvent self.stopEvent = id + '_stopEvent' self.stopEventList = [self.stopEvent] - def updateFunc(self, t, event = IVAL_NONE): + def updateFunc(self, t, event = Interval.IVAL_NONE): """ updateFunc(t, event) Go to time t """ @@ -57,7 +57,7 @@ class SoundInterval(Interval): if self.sound: self.sound.stop() self.ignore(self.stopEvent) - elif (event == IVAL_INIT): + elif (event == Interval.IVAL_INIT): # IVAL_INIT event, start new sound # If its within a 10th of a second of the start, # start at the beginning