Răsfoiți Sursa

*** empty log message ***

Mark Mine 24 ani în urmă
părinte
comite
02ce591c1e

+ 5 - 5
direct/src/interval/ActorInterval.py

@@ -1,12 +1,12 @@
 """ActorInterval module: contains the ActorInterval class"""
 """ActorInterval module: contains the ActorInterval class"""
 
 
 from PandaModules import *
 from PandaModules import *
-from Interval import *
+import Interval
 import math
 import math
 
 
 import DirectNotifyGlobal
 import DirectNotifyGlobal
 
 
-class ActorInterval(Interval):
+class ActorInterval(Interval.Interval):
 
 
     # create ActorInterval DirectNotify category
     # create ActorInterval DirectNotify category
     notify = directNotify.newCategory('ActorInterval')
     notify = directNotify.newCategory('ActorInterval')
@@ -59,7 +59,7 @@ class ActorInterval(Interval):
             reverse = 1
             reverse = 1
 
 
         # Initialize superclass
         # Initialize superclass
-        Interval.__init__(self, name, duration, reverse=reverse)
+        Interval.Interval.__init__(self, name, duration, reverse=reverse)
         # Update stopEvent
         # Update stopEvent
         self.stopEvent = id + '_stopEvent'
         self.stopEvent = id + '_stopEvent'
         if self.loopAnim:
         if self.loopAnim:
@@ -92,7 +92,7 @@ class ActorInterval(Interval):
                           (self.name,frame))
                           (self.name,frame))
         return frame
         return frame
 
 
-    def updateFunc(self, t, event=IVAL_NONE):
+    def updateFunc(self, t, event=Interval.IVAL_NONE):
         """ updateFunc(t, event)
         """ updateFunc(t, event)
             Go to time t
             Go to time t
         """
         """
@@ -111,7 +111,7 @@ class ActorInterval(Interval):
                 'updateFunc() - %s stoping at frame: ' % self.name +
                 'updateFunc() - %s stoping at frame: ' % self.name +
                 '%d Num frames: %d' % (frame, self.numFrames))
                 '%d Num frames: %d' % (frame, self.numFrames))
         elif self.loopAnim == 1:
         elif self.loopAnim == 1:
-            if event == IVAL_INIT:
+            if event == Interval.IVAL_INIT:
                 # Pose anim
                 # Pose anim
                 self.goToT(t)
                 self.goToT(t)
                 # And start loop, restart flag says continue from current frame
                 # And start loop, restart flag says continue from current frame

+ 4 - 4
direct/src/interval/FunctionInterval.py

@@ -1,8 +1,8 @@
 """FunctionInterval module: contains the FunctionInterval class"""
 """FunctionInterval module: contains the FunctionInterval class"""
 
 
 from PandaModules import *
 from PandaModules import *
-from Interval import *
 from MessengerGlobal import *
 from MessengerGlobal import *
+import Interval
 import types
 import types
 
 
 #############################################################
 #############################################################
@@ -11,7 +11,7 @@ import types
 ###                                                       ###
 ###                                                       ###
 #############################################################
 #############################################################
 
 
-class FunctionInterval(Interval):
+class FunctionInterval(Interval.Interval):
     # Name counter
     # Name counter
     functionIntervalNum = 1
     functionIntervalNum = 1
 
 
@@ -36,9 +36,9 @@ class FunctionInterval(Interval):
         # function to be called.  If false, IVAL_INIT calls have no effect
         # function to be called.  If false, IVAL_INIT calls have no effect
         # Event, Accept, Ignore intervals default to fOpenEnded = 0
         # Event, Accept, Ignore intervals default to fOpenEnded = 0
         # Parent, Pos, Hpr, etc intervals default to fOpenEnded = 1
         # 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)
         """ updateFunc(t, event)
             Go to time t
             Go to time t
         """
         """

+ 0 - 1
direct/src/interval/Interval.py

@@ -1,7 +1,6 @@
 """Interval module: contains the Interval class"""
 """Interval module: contains the Interval class"""
 
 
 from DirectObject import *
 from DirectObject import *
-from IntervalGlobal import *
 from PandaModules import *
 from PandaModules import *
 import Task
 import Task
 
 

+ 7 - 8
direct/src/interval/LerpInterval.py

@@ -1,11 +1,10 @@
 """LerpInterval module: contains the LerpInterval class"""
 """LerpInterval module: contains the LerpInterval class"""
 
 
-from Interval import *
 from PandaModules import *
 from PandaModules import *
-
+import Interval
 import LerpBlendHelpers
 import LerpBlendHelpers
 
 
-class LerpInterval(Interval):
+class LerpInterval(Interval.Interval):
     # create LerpInterval DirectNotify category
     # create LerpInterval DirectNotify category
     notify = directNotify.newCategory('LerpInterval')
     notify = directNotify.newCategory('LerpInterval')
     # Class methods
     # Class methods
@@ -17,13 +16,13 @@ class LerpInterval(Interval):
         self.functorFunc = functorFunc
         self.functorFunc = functorFunc
         self.blendType = self.getBlend(blendType)
         self.blendType = self.getBlend(blendType)
         # Initialize superclass
         # 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)
         """ updateFunc(t, event)
         """
         """
         # Check to see if we need to create the lerp
         # 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.lerp = Lerp(self.functorFunc(), self.duration, 
                                   self.blendType)
                                   self.blendType)
         # Make sure lerp exists
         # Make sure lerp exists
@@ -319,9 +318,9 @@ class LerpFunctionInterval(Interval):
                     LerpFunctionInterval.lerpFunctionIntervalNum)
                     LerpFunctionInterval.lerpFunctionIntervalNum)
             LerpFunctionInterval.lerpFunctionIntervalNum += 1
             LerpFunctionInterval.lerpFunctionIntervalNum += 1
         # Initialize superclass
         # 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)
         """ updateFunc(t, event)
         """
         """
         # Evaluate the function
         # Evaluate the function

+ 4 - 4
direct/src/interval/MopathInterval.py

@@ -1,10 +1,10 @@
 """MopathInterval module: contains the MopathInterval class"""
 """MopathInterval module: contains the MopathInterval class"""
 
 
-from Interval import *
+import Interval
 
 
 # import Mopath
 # import Mopath
 
 
-class MopathInterval(Interval):
+class MopathInterval(Interval.Interval):
     # Name counter
     # Name counter
     mopathNum = 1
     mopathNum = 1
     # create MopathInterval DirectNotify category
     # create MopathInterval DirectNotify category
@@ -22,9 +22,9 @@ class MopathInterval(Interval):
         # Compute duration
         # Compute duration
         duration = self.mopath.getMaxT()
         duration = self.mopath.getMaxT()
         # Initialize superclass
         # 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)
         """ updateFunc(t, event)
             Go to time t
             Go to time t
         """
         """

+ 5 - 5
direct/src/interval/ParticleInterval.py

@@ -1,11 +1,11 @@
 """ParticleInterval module: contains the ParticleInterval class"""
 """ParticleInterval module: contains the ParticleInterval class"""
 
 
 from PandaModules import *
 from PandaModules import *
-from Interval import *
+import Interval
 
 
 import ParticleEffect
 import ParticleEffect
 
 
-class ParticleInterval(Interval):
+class ParticleInterval(Interval.Interval):
     # Name counter
     # Name counter
     particleNum = 1
     particleNum = 1
     # create ParticleInterval DirectNotify category
     # create ParticleInterval DirectNotify category
@@ -27,13 +27,13 @@ class ParticleInterval(Interval):
         self.loop = loop
         self.loop = loop
         assert(duration > 0.0 or loop == 1)
         assert(duration > 0.0 or loop == 1)
         # Initialize superclass
         # Initialize superclass
-        Interval.__init__(self, name, duration)
+        Interval.Interval.__init__(self, name, duration)
         # Update stopEvent
         # Update stopEvent
         self.stopEvent = id + '_stopEvent'
         self.stopEvent = id + '_stopEvent'
         self.stopEventList = [self.stopEvent]
         self.stopEventList = [self.stopEvent]
         self.cleanedUp = 0
         self.cleanedUp = 0
 
 
-    def updateFunc(self, t, event=IVAL_NONE):
+    def updateFunc(self, t, event=Interval.IVAL_NONE):
         """ updateFunc(t, event)
         """ updateFunc(t, event)
         Go to time t
         Go to time t
         """
         """
@@ -46,7 +46,7 @@ class ParticleInterval(Interval):
             ParticleEffect.cleanupParticleEffect(self.particleEffect)
             ParticleEffect.cleanupParticleEffect(self.particleEffect)
             self.ignore(self.stopEvent)
             self.ignore(self.stopEvent)
             self.cleanedUp = 1
             self.cleanedUp = 1
-        elif (event == IVAL_INIT):
+        elif (event == Interval.IVAL_INIT):
             # IVAL_INIT event, start new particle effect
             # IVAL_INIT event, start new particle effect
             ParticleEffect.startParticleEffect(self.particleEffect,
             ParticleEffect.startParticleEffect(self.particleEffect,
                                                 self.parent, self.worldRelative)
                                                 self.parent, self.worldRelative)

+ 5 - 5
direct/src/interval/SoundInterval.py

@@ -1,9 +1,9 @@
 """SoundInterval module: contains the SoundInterval class"""
 """SoundInterval module: contains the SoundInterval class"""
 
 
 from PandaModules import *
 from PandaModules import *
-from Interval import *
+import Interval
 
 
-class SoundInterval(Interval):
+class SoundInterval(Interval.Interval):
     # Name counter
     # Name counter
     soundNum = 1
     soundNum = 1
     # create SoundInterval DirectNotify category
     # create SoundInterval DirectNotify category
@@ -42,12 +42,12 @@ class SoundInterval(Interval):
         if (name == None):
         if (name == None):
             name = id
             name = id
         # Initialize superclass
         # Initialize superclass
-        Interval.__init__(self, name, duration)
+        Interval.Interval.__init__(self, name, duration)
         # Update stopEvent
         # Update stopEvent
         self.stopEvent = id + '_stopEvent'
         self.stopEvent = id + '_stopEvent'
         self.stopEventList = [self.stopEvent]
         self.stopEventList = [self.stopEvent]
 
 
-    def updateFunc(self, t, event = IVAL_NONE):
+    def updateFunc(self, t, event = Interval.IVAL_NONE):
         """ updateFunc(t, event)
         """ updateFunc(t, event)
         Go to time t
         Go to time t
         """
         """
@@ -57,7 +57,7 @@ class SoundInterval(Interval):
             if self.sound:
             if self.sound:
                 self.sound.stop()
                 self.sound.stop()
             self.ignore(self.stopEvent)
             self.ignore(self.stopEvent)
-        elif (event == IVAL_INIT):
+        elif (event == Interval.IVAL_INIT):
             # IVAL_INIT event, start new sound
             # IVAL_INIT event, start new sound
             # If its within a 10th of a second of the start,
             # If its within a 10th of a second of the start,
             # start at the beginning
             # start at the beginning