# How to add keyframes for multiple objects at once

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?

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.

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

## 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.