Adding Child Of constraint after animation

Hi All,

I’ve been struggling to replicate the functionality of a feature found in - of all things - source film maker. In SFM when you change the parent of a bone that has keyframe animation applied to it you can choose to automatically preserve the visual transform of the bone. I’d like to be able to take a bone I’ve already animated, add a child of constraint and then change all my keyframes to counteract the effect of the constraint, and there doesn’t seem to be a clear way to do this.

I’m trying to do this because after blocking out a 30 second animation, I realized the characters hands would interpolate much better parented to her head, but I didn’t want to have to repose her hands on every keyframe.

in maya I would acheive this by baking the bone’s animation to a null, adding the parent constraint to the bone, then bake-snapping the now constrained bone back to the null. we did it all the time at my old work, we even had a few custom tools to speed up the process. In blender, it doesn’t seem so easy.

I’ve tried baking the animation to an empty, adding the child of constraint and then adding a copy transforms on top targeting the empty, and then hitting “disable and keep transforms” on the copy transforms constraint. Naively you’d think this would work, but for some reason I can’t (?) explain, it doesn’t. it’s as if “keeping the transform” of the copy transform constraint does nothing at all. I suspect given the way constraints work in blender, that’s exactly what’s happening, the copy transform is simply overwiting the child of, instead of counteracting it. I’ve also tried using inverted copy location and rotation constraints in a similar way, but to no avail. I’ve also tried diving into the console and just applying the correction with a simple script… I’m sure it could be done this way but I’m rather at my wit’s end. It should be easier than having to resort to python.

What’s frustrating is - of course - the Child Of constraint has the correction I want built in: it does it when you hit “set inverse”! But that transformation remains stuck in the bowels of the constraint, unable to be applied as an actual transform that can be keyed. Help!

Sorry if this was a bit confusing, I’ll try and make a demo blend. The file I’m working on has a lot of referenced libraries.

Let me make sure I understand: you have an existing animation for a hand IK bone, which is unconstrained and unparented (or inheriting nothing from its parents.) You would like to reinterpret this animation as what it would be if it was parented to the head bone, or a child-of the head bone. Is that correct?

What you actually want is to bake in the inverse of the child-of.

Here’s what I would try first: Go to frame 1. Create your child-of constraint on the hand IK and set inverse. Duplicate the hand IK bone. Apply selected as rest pose for the duplicate and delete its constraints. In edit, actually parent it to the head bone (not child-of). Mute the child-of on the hand IK. Give the duplicate a copy transforms (world->world) targeting the hand IK. Bake the action. Copy/paste the keyframes from the duplicate to the hand IK. Unmute the constraint. Delete the duplicate.

That’s untested, just reasoning my way through it; could easily have made a mistake somewhere.

I think, yeah, you understand correctly bandages. Here’s a blend demonstrating, just in case it helps clarify what I mean for anyone.

child of correction demo.blend (686.4 KB)

What I’m getting from your suggestion bandages is that there isn’t really an easy way of doing this. It does sound like it would work, though. In this case I’ll just choose between leaving it as-is and babystitting the interpolation a little more, or completely re-animating the hand.