5
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ possible duplicate of How to add keyframes for multiple objects at once $\endgroup$ – Aldrik Aug 28 '13 at 10:39
  • $\begingroup$ Not a duplicate - the previous question was about a blender feature, where this is finding a way to do what blender doesn't allow you to do normally. $\endgroup$ – sambler Aug 28 '13 at 11:41
  • $\begingroup$ As the answer to that question says it's done using keying sets. For more info see: Can I personalize the insert keyframe menu? $\endgroup$ – Aldrik Aug 28 '13 at 13:47
  • $\begingroup$ @Aldrik How would I go about adding the properties of each object to a keying set? (without doing individually for each one) $\endgroup$ – gandalf3 Aug 28 '13 at 19:21
  • $\begingroup$ I wouldn't, I'd create a Builtin Keying Set (see the previous link for info). $\endgroup$ – Aldrik Aug 28 '13 at 21:00
9
$\begingroup$

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")
$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – sambler Aug 28 '13 at 11:36
  • 1
    $\begingroup$ 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. $\endgroup$ – gandalf3 Aug 29 '13 at 19:19
  • $\begingroup$ 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. $\endgroup$ – Copperplate Mar 3 '18 at 23:18
-2
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ "add one keyframe for each".. for 95 objects? ;) could you elaborate on ways to script this? thanks. $\endgroup$ – gandalf3 Aug 28 '13 at 18:49
  • $\begingroup$ @gandalf3 I've added an example to the other question. $\endgroup$ – Aldrik Aug 28 '13 at 21:02
  • 1
    $\begingroup$ This doesn't really answer the question as it doesn't give any real detail on how to do anything mentioned. $\endgroup$ – A Wild RolandiXor Aug 29 '13 at 15:38

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.