mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
allowing ability to specify partnames when using getFrameTime
This commit is contained in:
parent
9189ad4362
commit
021df54242
@ -649,9 +649,9 @@ class Actor(DirectObject, NodePath):
|
||||
return None
|
||||
return controls[0].getNumFrames()
|
||||
|
||||
def getFrameTime(self, anim, frame):
|
||||
numFrames = self.getNumFrames(anim)
|
||||
animTime = self.getDuration(anim)
|
||||
def getFrameTime(self, animName, frame, partName=None):
|
||||
numFrames = self.getNumFrames(anim,partName)
|
||||
animTime = self.getDuration(anim,partName)
|
||||
frameTime = animTime * float(frame) / numFrames
|
||||
return frameTime
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user