5

I know it's possible to keyframe UI properties, and it's possible to animate many objects at once for Location, Rotation, and Scale.

But is it possible to insert a keyframe for a UI property for many objects at once?

e.g. Animating rigid body properties for shards of a cell-fractured object

How can I achieve this?

gandalf3
  • 157,169
  • 58
  • 601
  • 1,133

3 Answers3

9

So the easy solution would be to write a script that creates keyframes for every selected object.

While the Rigid Body Tools will copy attributes from the active object to all selected, it doesn't copy keyframes. Copying keyframes could be something to add to the Rigid Body Tools. I would think that the animated checkbox is probably the only Rigid Body option that would normally be keyframed.

Within the 3DView, Insert Keyframes will keyframe the same properties for every selected object. Creating a keyingset with an interface property doesn't allow the property to be keyframed for all selected objects. Sounds like a deficiency in the create interface value keyframe operator.

EDIT: There are some options that can help under some circumstances -

CtrlL -> Animation data - can create keyframes for every object to match keyframes for the active object. This creates keyframes for the same properties in each object - it doesn't make the properties the same as the active object.

For rigid body options you can set and keyframe the active object, use rigid body tools to copy settings from active, re-do calculate mass, then CtrlL -> Animation data to create keyframes for each object.

This doesn't apply to non-rigid body values. The following script can easily be modified to set and keyframe a specific value on every selected object, adjusting to work on multiple values is also easy. I used rigid_body.kinematic as an example as I see this as the most likely value to be used in this scenario.

import bpy

set_kinematic = bpy.context.active_object.rigid_body.kinematic

for object in bpy.context.selected_objects:
    object.rigid_body.kinematic = set_kinematic
    object.keyframe_insert(data_path="rigid_body.kinematic")
sambler
  • 55,387
  • 3
  • 59
  • 192
  • Creating a script to insert keyframes is a better option than modifying your version of blender. You can keep your script for next time you need it whereas blender mods will be overwritten each time you upgrade. I think that user created keying sets are of limited use as they are now, they should be able to work on all selected objects not just one specific object. – sambler Aug 28 '13 at 11:36
  • 1
    What worked for me: 1. RMB on UI property > copy to selected. 2. RMB in UI property > Insert keyframe 3. Ctrl+L > Animation data 4. U > Object Animation. done. – gandalf3 Aug 29 '13 at 19:19
  • Wow, this is a fantastic solution, Sambler!! Thank you so much. I needed a way to copy the "Animated" property to many rigid bodies without overriding the animation already present on each. Also, thanks Gandalf3 for that great tip. That's a perfect solution for any situation where all affected objects are able to share the same animation data, and is very useful. – Copperplate Mar 03 '18 at 23:18
-1

There is this commercial add-on, Key Selected Objects, which lets you add/delete keys for multiple objects from the user interface: Key Selected Objects

-2

Anything you've already keyframed will turn up in the Dope Sheet. So add one keyframe for each and then it should be easy.

Other than that - scripting.

krivar
  • 671
  • 5
  • 13