*** empty log message ***

This commit is contained in:
Mark Mine 2002-02-11 19:51:27 +00:00
parent c8dec900de
commit 02ce591c1e
7 changed files with 30 additions and 32 deletions

View File

@ -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

View File

@ -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
"""

View File

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

View File

@ -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

View File

@ -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
"""

View File

@ -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)

View File

@ -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