mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Added ability to adjust duration
This commit is contained in:
parent
3788d6feb8
commit
6ff6735166
@ -13,18 +13,21 @@ class MopathInterval(LerpInterval.LerpFunctionInterval):
|
||||
notify = directNotify.newCategory('MopathInterval')
|
||||
# Class methods
|
||||
def __init__(self, mopath, node, fromT = 0, toT = None,
|
||||
blendType = 'noBlend', name = None):
|
||||
duration = None, blendType = 'noBlend', name = None):
|
||||
if toT == None:
|
||||
toT = mopath.getMaxT()
|
||||
|
||||
if duration == None:
|
||||
duration = abs(toT - fromT)
|
||||
|
||||
# Generate unique name if necessary
|
||||
if (name == None):
|
||||
name = 'Mopath-%d' % MopathInterval.mopathNum
|
||||
MopathInterval.mopathNum += 1
|
||||
MopathInterval.mopathNum += 1
|
||||
|
||||
LerpInterval.LerpFunctionInterval.__init__(
|
||||
self, self.__doMopath, fromData = fromT, toData = toT,
|
||||
duration = abs(toT - fromT), blendType = blendType,
|
||||
duration = duration, blendType = blendType,
|
||||
name = name)
|
||||
|
||||
self.mopath = mopath
|
||||
|
Loading…
x
Reference in New Issue
Block a user