mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
added optional parameters in getAnimControls
This commit is contained in:
parent
b1ae01f7db
commit
a7288f855b
@ -183,7 +183,8 @@ class LerpAnimInterval(CLerpAnimEffectInterval):
|
||||
|
||||
def __init__(self, actor, duration, startAnim, endAnim,
|
||||
startWeight = 0.0, endWeight = 1.0,
|
||||
blendType = 'noBlend', name = None):
|
||||
blendType = 'noBlend', name = None,
|
||||
partName=None, lodName=None):
|
||||
# Generate unique name if necessary
|
||||
if (name == None):
|
||||
name = 'LerpAnimInterval-%d' % LerpAnimInterval.lerpAnimNum
|
||||
@ -196,13 +197,17 @@ class LerpAnimInterval(CLerpAnimEffectInterval):
|
||||
CLerpAnimEffectInterval.__init__(self, name, duration, blendType)
|
||||
|
||||
if startAnim != None:
|
||||
controls = actor.getAnimControls(startAnim)
|
||||
controls = actor.getAnimControls(
|
||||
startAnim, partName = partName, lodName = lodName)
|
||||
#controls = actor.getAnimControls(startAnim)
|
||||
for control in controls:
|
||||
self.addControl(control, startAnim,
|
||||
1.0 - startWeight, 1.0 - endWeight)
|
||||
|
||||
if endAnim != None:
|
||||
controls = actor.getAnimControls(endAnim)
|
||||
controls = actor.getAnimControls(
|
||||
endAnim, partName = partName, lodName = lodName)
|
||||
#controls = actor.getAnimControls(endAnim)
|
||||
for control in controls:
|
||||
self.addControl(control, endAnim,
|
||||
startWeight, endWeight)
|
||||
|
Loading…
x
Reference in New Issue
Block a user