trackview > curve editor > keyframe functions
Hi,
I'm an experienced Maya animator but a newb at Max and Maxscript. I'm trying to translate my favorite mel scripts into maxscript. I've RTFM (read the f*ing manual) on mel and maxscript, and can't find maxscript equivalents of some mel commands. Here is what I'm looking for:
keyframe -an keys -q -keyframeCount;
Mel command that returns an integer for the number of keys you have selected in the graph editor(trackview curve editor in Max). If you've got 20 keys selected in the track view, it returns 20. It doesn't matter what track or what controller they are.
keyframe -q -timeChange;
returns an integer array for the times (in frames) of each selected keyframe in the graph editor.
I have not been able to find a maxscript command that does the same thing.
Basically, I want to be able to select a bunch of keys in the curve editor and find out how many I have selected, then create an array of all of their times (in frames) from earliest to latest.
These two maxscript commands seem like what I should use:
isKeySelected
getKeyTime
...but the problem I'm running into is the controllers. I don't want to have to recursively search through every possible controller that the node could be using, for example:
$.position.controller.x_position.keys
$.position.controller.y_position.keys
etc etc etc
This seems very clunky. Do you guys know of any elegant max commands that are equivalents of those two mel commands?
If I do need to create some function that recursively goes through all the controllers to find the selected keys and their times, I may need some help to understand how that index/matrix system works in maxscript.
Thanks!
Comments
Hi vindalsaceI don't have
Hi vindalsace
I don't have experience in MEL, but i try to help you...
I think you need looping methode to get/use index
example :
if you need detail XYZ position separation:
Regards