mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -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 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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user