Bladeren bron

added optional parameters in getAnimControls

Samir Naik 21 jaren geleden
bovenliggende
commit
a7288f855b
1 gewijzigde bestanden met toevoegingen van 8 en 3 verwijderingen
  1. 8 3
      direct/src/interval/ActorInterval.py

+ 8 - 3
direct/src/interval/ActorInterval.py

@@ -183,7 +183,8 @@ class LerpAnimInterval(CLerpAnimEffectInterval):
 
 
     def __init__(self, actor, duration, startAnim, endAnim,
     def __init__(self, actor, duration, startAnim, endAnim,
                  startWeight = 0.0, endWeight = 1.0,
                  startWeight = 0.0, endWeight = 1.0,
-                 blendType = 'noBlend', name = None):
+                 blendType = 'noBlend', name = None,
+                 partName=None, lodName=None):
         # Generate unique name if necessary
         # Generate unique name if necessary
         if (name == None):
         if (name == None):
             name = 'LerpAnimInterval-%d' % LerpAnimInterval.lerpAnimNum
             name = 'LerpAnimInterval-%d' % LerpAnimInterval.lerpAnimNum
@@ -196,13 +197,17 @@ class LerpAnimInterval(CLerpAnimEffectInterval):
         CLerpAnimEffectInterval.__init__(self, name, duration, blendType)
         CLerpAnimEffectInterval.__init__(self, name, duration, blendType)
 
 
         if startAnim != None:
         if startAnim != None:
-            controls = actor.getAnimControls(startAnim)
+            controls = actor.getAnimControls(
+                startAnim, partName = partName, lodName = lodName)
+            #controls = actor.getAnimControls(startAnim)
             for control in controls:
             for control in controls:
                 self.addControl(control, startAnim,
                 self.addControl(control, startAnim,
                                 1.0 - startWeight, 1.0 - endWeight)
                                 1.0 - startWeight, 1.0 - endWeight)
                 
                 
         if endAnim != None:
         if endAnim != None:
-            controls = actor.getAnimControls(endAnim)
+            controls = actor.getAnimControls(
+                endAnim, partName = partName, lodName = lodName)
+            #controls = actor.getAnimControls(endAnim)
             for control in controls:
             for control in controls:
                 self.addControl(control, endAnim,
                 self.addControl(control, endAnim,
                                 startWeight, endWeight)
                                 startWeight, endWeight)