mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
*** empty log message ***
This commit is contained in:
parent
15f312f2b1
commit
8c60b9d7a2
@ -8,7 +8,8 @@ import DirectNotifyGlobal
|
|||||||
|
|
||||||
class ActorInterval(Interval):
|
class ActorInterval(Interval):
|
||||||
|
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('ActorInterval')
|
# create ActorInterval DirectNotify category
|
||||||
|
notify = directNotify.newCategory('ActorInterval')
|
||||||
|
|
||||||
# Name counter
|
# Name counter
|
||||||
animNum = 1
|
animNum = 1
|
||||||
@ -65,7 +66,7 @@ class ActorInterval(Interval):
|
|||||||
# Pose anim
|
# Pose anim
|
||||||
self.actor.pose(self.animName, frame)
|
self.actor.pose(self.animName, frame)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug('ActorInterval.goToT() - %s pose to frame: %d' %
|
self.notify.debug('goToT() - %s pose to frame: %d' %
|
||||||
(self.name,frame))
|
(self.name,frame))
|
||||||
return frame
|
return frame
|
||||||
|
|
||||||
@ -85,8 +86,7 @@ class ActorInterval(Interval):
|
|||||||
self.ignore(self.stopEvent)
|
self.ignore(self.stopEvent)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug(
|
self.notify.debug(
|
||||||
'ActorInterval.updateFunc() - %s stoping at frame: ' %
|
'updateFunc() - %s stoping at frame: ' % self.name +
|
||||||
self.name +
|
|
||||||
'%d Num frames: %d' % (frame, self.numFrames))
|
'%d Num frames: %d' % (frame, self.numFrames))
|
||||||
elif self.loop == 1:
|
elif self.loop == 1:
|
||||||
if event == IVAL_INIT:
|
if event == IVAL_INIT:
|
||||||
@ -97,7 +97,7 @@ class ActorInterval(Interval):
|
|||||||
self.accept(self.stopEvent, self.actor.stop)
|
self.accept(self.stopEvent, self.actor.stop)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug(
|
self.notify.debug(
|
||||||
'ActorInterval.updateFunc() - IVAL_INIT %s looping anim' %
|
'updateFunc() - IVAL_INIT %s looping anim' %
|
||||||
self.name)
|
self.name)
|
||||||
else:
|
else:
|
||||||
# Pose anim
|
# Pose anim
|
||||||
|
@ -13,6 +13,10 @@ from MessengerGlobal import *
|
|||||||
class FunctionInterval(Interval):
|
class FunctionInterval(Interval):
|
||||||
# Name counter
|
# Name counter
|
||||||
functionIntervalNum = 1
|
functionIntervalNum = 1
|
||||||
|
|
||||||
|
# create FunctionInterval DirectNotify category
|
||||||
|
notify = directNotify.newCategory('FunctionInterval')
|
||||||
|
|
||||||
# Class methods
|
# Class methods
|
||||||
def __init__(self, function, name = None, openEnded = 1, extraArgs = []):
|
def __init__(self, function, name = None, openEnded = 1, extraArgs = []):
|
||||||
"""__init__(function, name = None)
|
"""__init__(function, name = None)
|
||||||
@ -40,8 +44,7 @@ class FunctionInterval(Interval):
|
|||||||
apply(self.function, self.extraArgs)
|
apply(self.function, self.extraArgs)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug(
|
self.notify.debug(
|
||||||
'FunctionInterval.updateFunc() - %s: executing Function' %
|
'updateFunc() - %s: executing Function' % self.name)
|
||||||
self.name)
|
|
||||||
|
|
||||||
### FunctionInterval subclass for throwing events ###
|
### FunctionInterval subclass for throwing events ###
|
||||||
class EventInterval(FunctionInterval):
|
class EventInterval(FunctionInterval):
|
||||||
|
@ -6,6 +6,8 @@ from PandaModules import *
|
|||||||
import LerpBlendHelpers
|
import LerpBlendHelpers
|
||||||
|
|
||||||
class LerpInterval(Interval):
|
class LerpInterval(Interval):
|
||||||
|
# create LerpInterval DirectNotify category
|
||||||
|
notify = directNotify.newCategory('LerpInterval')
|
||||||
# Class methods
|
# Class methods
|
||||||
def __init__(self, name, duration, functorFunc, blendType='noBlend'):
|
def __init__(self, name, duration, functorFunc, blendType='noBlend'):
|
||||||
"""__init__(name, duration, functorFunc, blendType)
|
"""__init__(name, duration, functorFunc, blendType)
|
||||||
@ -31,8 +33,7 @@ class LerpInterval(Interval):
|
|||||||
# Evaluate the lerp
|
# Evaluate the lerp
|
||||||
self.lerp.setT(t)
|
self.lerp.setT(t)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug('LerpInterval.updateFunc() - %s: t = %f' %
|
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||||
(self.name, t))
|
|
||||||
|
|
||||||
def getBlend(self, blendType):
|
def getBlend(self, blendType):
|
||||||
"""__getBlend(self, string)
|
"""__getBlend(self, string)
|
||||||
@ -252,8 +253,9 @@ class LerpPosHprScaleInterval(LerpInterval):
|
|||||||
class LerpFunctionInterval(Interval):
|
class LerpFunctionInterval(Interval):
|
||||||
# Interval counter
|
# Interval counter
|
||||||
lerpFunctionIntervalNum = 1
|
lerpFunctionIntervalNum = 1
|
||||||
|
# create LerpFunctionInterval DirectNotify category
|
||||||
|
notify = directNotify.newCategory('LerpFunctionInterval')
|
||||||
# Class methods
|
# Class methods
|
||||||
|
|
||||||
def __init__(self, function, fromData = 0, toData = 1, duration = 0.0,
|
def __init__(self, function, fromData = 0, toData = 1, duration = 0.0,
|
||||||
blendType = 'noBlend', extraArgs = [], name = None):
|
blendType = 'noBlend', extraArgs = [], name = None):
|
||||||
"""__init__(function, duration, fromData, toData, name)
|
"""__init__(function, duration, fromData, toData, name)
|
||||||
@ -289,8 +291,7 @@ class LerpFunctionInterval(Interval):
|
|||||||
# Evaluate function
|
# Evaluate function
|
||||||
apply(self.function, [data] + self.extraArgs)
|
apply(self.function, [data] + self.extraArgs)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug('LerpFunctionInterval.updateFunc() - %s: t = %f' %
|
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||||
(self.name, t))
|
|
||||||
|
|
||||||
def getBlend(self, blendType):
|
def getBlend(self, blendType):
|
||||||
"""__getBlend(self, string)
|
"""__getBlend(self, string)
|
||||||
|
@ -7,6 +7,8 @@ import Mopath
|
|||||||
class MopathInterval(Interval):
|
class MopathInterval(Interval):
|
||||||
# Name counter
|
# Name counter
|
||||||
mopathNum = 1
|
mopathNum = 1
|
||||||
|
# create MopathInterval DirectNotify category
|
||||||
|
notify = directNotify.newCategory('MopathInterval')
|
||||||
# Class methods
|
# Class methods
|
||||||
def __init__(self, mopath, node, name=None):
|
def __init__(self, mopath, node, name=None):
|
||||||
"""__init__(mopath, node, name)
|
"""__init__(mopath, node, name)
|
||||||
@ -28,6 +30,5 @@ class MopathInterval(Interval):
|
|||||||
"""
|
"""
|
||||||
self.mopath.goTo(self.node, t)
|
self.mopath.goTo(self.node, t)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug('MopathInterval.updateFunc() - %s: t = %f' %
|
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||||
(self.name, t))
|
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@ from Interval import *
|
|||||||
class SoundInterval(Interval):
|
class SoundInterval(Interval):
|
||||||
# Name counter
|
# Name counter
|
||||||
soundNum = 1
|
soundNum = 1
|
||||||
|
# create SoundInterval DirectNotify category
|
||||||
|
notify = directNotify.newCategory('SoundInterval')
|
||||||
# Class methods
|
# Class methods
|
||||||
# Create a sound interval
|
# Create a sound interval
|
||||||
# If loop = 0, sound will play once, duration of the interval
|
# If loop = 0, sound will play once, duration of the interval
|
||||||
@ -71,8 +73,7 @@ class SoundInterval(Interval):
|
|||||||
# Accept event to kill sound
|
# Accept event to kill sound
|
||||||
self.accept(self.stopEvent, lambda s = self: AudioManager.stop(s.sound))
|
self.accept(self.stopEvent, lambda s = self: AudioManager.stop(s.sound))
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug('SoundInterval.updateFunc() - %s: t = %f' %
|
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||||
(self.name, t))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user