mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
setPlayRate requires 2 params
This commit is contained in:
parent
b41f230f44
commit
6a35ec3075
@ -482,11 +482,16 @@ class Actor(PandaObject, NodePath):
|
|||||||
|
|
||||||
return controls[0].getPlayRate()
|
return controls[0].getPlayRate()
|
||||||
|
|
||||||
def setPlayRate(self, rate, animName=None, partName=None):
|
def setPlayRate(self, rate, animName, partName=None):
|
||||||
"""getPlayRate(self, float, string=None, string=None)
|
"""getPlayRate(self, float, string, string=None)
|
||||||
Set the play rate of given anim for a given part.
|
Set the play rate of given anim for a given part.
|
||||||
If no part is given, set for all parts in dictionary.
|
If no part is given, set for all parts in dictionary.
|
||||||
If no anim is given, find the current anim for the part.
|
|
||||||
|
It used to be legal to let the animName default to the
|
||||||
|
currently-playing anim, but this was confusing and could lead
|
||||||
|
to the wrong anim's play rate getting set. Better to insist
|
||||||
|
on this parameter.
|
||||||
|
|
||||||
NOTE: sets play rate on all LODs"""
|
NOTE: sets play rate on all LODs"""
|
||||||
for control in self.getAnimControls(animName, partName):
|
for control in self.getAnimControls(animName, partName):
|
||||||
control.setPlayRate(rate)
|
control.setPlayRate(rate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user