[Closed] Help with selecting keys
So I’m trying to write a script similar to the tween machine for Maya, and it is working for the most part, but I have to have the keys selected first in order for it to work. What I want to be able to do is have the time slider in between 2 keys, and at the press of a button select those 2 surrounding keys and run the script I’ve written. I can loop through the keyArray to find these keyframes to find the one just above and just below the currentTime, but only if I know the specific controllers of the keys. Is there a way to do this without knowing the specific controllers? Even just being able to get the frame numbers of the previous and next keyframes on the timeline would solve my problem.
Hi,
Check out AddInBetween ( http://www.oferz.com/maxscripts.php#addInBetween ) it might do what you want, and if not, you can look at the code and see how I selected the surronding keys.
Cheers,
o