added getFrameTime

This commit is contained in:
Samir Naik 2005-06-21 21:50:06 +00:00
parent f2d51ada3d
commit 40b95dfb56
1 changed files with 6 additions and 0 deletions

View File

@ -535,6 +535,12 @@ class Actor(PandaObject, NodePath):
if len(controls) == 0:
return None
return controls[0].getNumFrames()
def getFrameTime(self, anim, frame):
numFrames = self.getNumFrames(anim)
animTime = self.getDuration(anim)
frameTime = animTime * float(frame) / numFrames
return frameTime
def getCurrentAnim(self, partName=None):
"""