allowing ability to specify partnames when using getFrameTime

This commit is contained in:
Josh Wilson 2006-09-21 20:44:05 +00:00
parent 9189ad4362
commit 021df54242

View File

@ -649,9 +649,9 @@ class Actor(DirectObject, NodePath):
return None return None
return controls[0].getNumFrames() return controls[0].getNumFrames()
def getFrameTime(self, anim, frame): def getFrameTime(self, animName, frame, partName=None):
numFrames = self.getNumFrames(anim) numFrames = self.getNumFrames(anim,partName)
animTime = self.getDuration(anim) animTime = self.getDuration(anim,partName)
frameTime = animTime * float(frame) / numFrames frameTime = animTime * float(frame) / numFrames
return frameTime return frameTime