Add or remove key frames using MEL in Maya
Hi guys, I have been using this method for a while now, and I have found it quite useful. So I thought it could be a salient idea to share with you guys as well as for future reference so that I can find it. :D
So let's get started. Firstly, Let me introduce the following MEL code:
So, its very straight forward, the first line is adding a frame, the second one is removing a frame.
Next, let's make a button on a shelf.
1. create a new shelf or use the existing one.
2. open up script editor, copy and past the code above to the editor
3. select one line,and hold MMB(middle mouse button) and drag the code to the shelf, save as MEL script.
4. select the other line, and do the same as above.
5. change names, I usually name it as '+key' and '-key'.
when you animate a shot, if you want to adjust the timing of one particular part, then remember to select all the controls and then add or remove frames. This way, you won't mess up with your keyframes and other timing.
Hope this helps.