14
$\begingroup$

I've got about 200 objects for which I want to insert location/rotation keyframes.

Is there a way to add a keyframe for all of the selected objects?

$\endgroup$
10
$\begingroup$

Assuming you're talking about actual objects (not a mix of objects and armature bones), the easiest thing would be to select all of the objects and, from within the 3D View, press I and choose LocRot. That will insert a key for location and rotation on all selected objects.

If your needs are more nuanced, you may want to consider building a custom keying set. In that, you can specify any number of different properties from any number of objects (and non-objects... like World properties) and key them all at the same time. If you're interested in taking that route, then Getting to Grips with Keying Sets is a good start.

$\endgroup$
  • $\begingroup$ Nice! I've always been adding keyframes by right clicking on properties in the object menu :) $\endgroup$ – ajwood Jul 4 '13 at 11:35
6
$\begingroup$

Keying Sets

As Fweeb said, the standard way of handling this is using Keying Sets. Accessible in the 3D View under Object > Animation > Insert Keyframe… (I). There's a limited set by default but custom ones can be added. For more info see: Can I personalize the insert keyframe menu?

Scripting

Any time a task would be repetitive to do by hand, scripting is a good choice. Here's a quick example of how to insert a keyframe to all the objects in a selection:

import bpy

for obj in bpy.context.selected_objects:
    obj.scale[2] = 0.5 # Set Z scale.
    obj.keyframe_insert(data_path="scale", index=2) # Keyframe it.

Linked Animation datablocks

If creating the same animation on all object, you can animate just the active object and then link the action to the rest of the selection: Object > Make links… (Ctrl+L) > Animation Data). If you wish to later mix in some unique animation, turn the action into a NLA strip before linking.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.