mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
return None for getDuration() if __animControlDict is empty
This commit is contained in:
parent
a667e91dce
commit
9191f85b85
@ -756,13 +756,13 @@ class Actor(DirectObject, NodePath):
|
|||||||
If no anim is given, find the current anim for the part.
|
If no anim is given, find the current anim for the part.
|
||||||
NOTE: Returns info only for an arbitrary LOD
|
NOTE: Returns info only for an arbitrary LOD
|
||||||
"""
|
"""
|
||||||
|
if self.__animControlDict:
|
||||||
# use the first lod
|
# use the first lod
|
||||||
lodName = self.__animControlDict.keys()[0]
|
lodName = self.__animControlDict.keys()[0]
|
||||||
controls = self.getAnimControls(animName, partName)
|
controls = self.getAnimControls(animName, partName)
|
||||||
if len(controls) == 0:
|
if controls:
|
||||||
return None
|
|
||||||
|
|
||||||
return controls[0].getPlayRate()
|
return controls[0].getPlayRate()
|
||||||
|
return None
|
||||||
|
|
||||||
def setPlayRate(self, rate, animName, partName=None):
|
def setPlayRate(self, rate, animName, partName=None):
|
||||||
"""setPlayRate(self, float, string, string=None)
|
"""setPlayRate(self, float, string, string=None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user