trancor
07-03-2008, 03:44 AM
Hey, I've been running into some issues with querying pretty much any information from keyframes. You can't query based on time, based on the keyframe id or what ever because the queries only return float[] values.
So is there a way to find out the specific index on a key? This is the only way I can think to find anything I need, when I have the index I can just use that element from the float[] that I get from the keyframe and keyTangent commands.
I came up with a way to do it, but it's such a round-about insane way to do something that should be so simple. (I haven't written it but) starting from 0, having a script count every frame using the findKeyframe command. By checking what time the frame is at and if it's not within the range I need to keep going on to the next frame. This would suck for script run time if I have a huge animation and alot of keys per attribute.
How do you find out a keyframe's index or can I find a keyframe's tangent angle or tangent weight by the time of the frame somehow?
So is there a way to find out the specific index on a key? This is the only way I can think to find anything I need, when I have the index I can just use that element from the float[] that I get from the keyframe and keyTangent commands.
I came up with a way to do it, but it's such a round-about insane way to do something that should be so simple. (I haven't written it but) starting from 0, having a script count every frame using the findKeyframe command. By checking what time the frame is at and if it's not within the range I need to keep going on to the next frame. This would suck for script run time if I have a huge animation and alot of keys per attribute.
How do you find out a keyframe's index or can I find a keyframe's tangent angle or tangent weight by the time of the frame somehow?
