[Addon] Timeline KeyMover -- updated 7/31

Update 7/31/13:
I wanted to write a little script that would allow me to move keyframes directly in the timeline, so I came up with this.

There’s a link to the right of the page that says “download”, please use that. (In other words, if the console gives you an error about the script missing “bl_info”, you’ve downloaded it incorrectly :))

I’ve recently added the following:
-“Key Copier”: gives you the ability to copy all keys for the selected object/bones on the current frame, and begin moving them. Be careful if the selected_object/bones have keys on the frame after the current frame – it will overwrite them.
-You can now move keys either only on the current frame, or all keys in the playback range. There’s an option in the timeline header to select one or the other. Hint - use the preview playback P/Alt+P hotkeys to set/unset the frame range to include only desired keys.
-Moving keys now works on multiple selected objects.
-An option to move keys only on selected bones.

Download the addon on bitbucket: https://bitbucket.org/ohsnapitsjoel/anim_timeline_keymover

Known issues:
-It’s really intended for moving keyframes around in their respective ranges, to fix timing issues.
-If you move the selected keyframe PAST the previous or next keyframe, you’ll get some weirdness in the fcurves. You’ll have to grab the offending keys in the fcurve editor and do one of those “G-key, Right-click” maneuvers to set the curves back to normal.


script do not work in blender 2.68 2.67…

Well, I should say two things:

  1. When you report that a script “doesn’t work”, please be sure to always report the errors you experience. “Script do not work” doesn’t help me help you figure out why it’s not working.
  2. I left out a comma when I made an update. I fixed that, so try downloading it again.

you are right, it is my mistake. Excuse me. ( It was not possible to install script - addons)

2.68 everything is ok! Thank you.

I did a quick test on 2.68 and it does work. One thing you might want to check for is the presence of a keyframe at the current frame. For instance I tried it on a frame # that does not have any keyframes and the AddOn still presented the Offset text. If there is no keyframe, simply abort would be a nice little feature.

You got it :slight_smile:

Edit: Done. I also set the default for ‘Follow Movement’ to True, I figure this makes more sense. This way, a user can expect more predictable default behavior (being able to change the key placement repeatedly).

Glad it’s working for you now!

I’m thinking of adding a separate operator for copying keys from only selected bones on the current frame, then being able to drag them to a new place in the timeline… I’ll update soon.

You know the next thing people will want is the ability to move a group of them.:eyebrowlift:

Have you taken a look at how the Houdini timeline handles that?

I’ve thought about that, cause I want that too! Any ideas on how to do that? I don’t have any yet. The problem so far has been how to select which keyframes are being moved…

Nope, I haven’t, but I suspect it does it well?

Hmm, I’m actually having a dilemma that I didn’t anticipate. Should I use keyframe_insert() to copy frames, or use a lower-level way of doing this? A lower-level method might mean looping quite a bit more…

Until you experience a big performance problem I would stick with keyframe_insert().

When you talk about copying frames are you simply issuing an evaluate on the source then setting that same value on the target’s associated parameter at a target frame #?

I’m not sure what you mean exactly… but yes, if you’re saying what I think you’re saying.

Edit: Well, I just realized that keyframe_insert() is setting a keyframe on the fcurve at an interpolated value. So its Y value totally depends on the fcurve interpolation, rather than duplicating the Y value of another frame. I guess I should have expected that…

So maybe I have to go lower-level with this?

Edit #2: Never mind, I was doing something wrong. :slight_smile:

Edited: continuing the technical conversation in a support thread - http://www.blenderartists.org/forum/showthread.php?301876-How-to-collect-keys-created-with-keyframe_insert()&p=2430997#post2430997

add delete keys on timtline?

Is that a feature request? If so, I’m not convinced it’s necessary. There are multiple quick and convenient ways to add keys (I-key, auto-keying, keying sets, etc.) and Alt+I is easy enough to do for deleting keys.

I think adding extra little things like this wouldn’t actually do much more than unintentionally clutter up the UI in the timeline, and the major motivation for writing this addon was to keep UI clutter to a minimum when animating! :slight_smile:

I haven’t committed the changes to the addon yet but I’m adding some functionality for choosing whether to move a group of keyframes or only the keys on the current frame, as well as for moving keyframes in these ways for multiple selected objects instead of only the active object.

I’ve updated the addon on bitbucket, and I’ll edit the first post with the changes.

Wow.Great addon.Thanks for creating this and sharing it with us.Btw,u should do a youtube vid showing ur addons in action.This will help ppl understand how to use them properly and also create more awareness/publicity about them.

Really very useful addon,very similar to maya’s timeline.I don’t get why u have to use the dopesheet for all that.Moving keys in the timeline is way faster and intuitive.

Thanks for sharing.

awesome addon, thanks.