Rigging child of swap between two parents

Hi there! I’m trying to figure out something that is likely very simple, but is kicking my rear end. I have a bone (Child 1) whose parent I want to switch between two bones (Parent 1 and Parent 2) via a switch (Switch).

I have two child of constraints on the Child bone, and it’s easy peasy to manually swap influence between them. What has me stumped is when I add drivers to the Child of Influence channels.

Setting up the Child of_1 constraint for Parent 1 is straightforward enough. It’s Parent 2 that I’m stumped on. What I want to do is set up the Child of_2 constraint to be the opposite of Child of_1, so while Child of_1 is at influence 1.000, Child of_2 is at 0.000, and vice versa. How might I go about doing that, or maybe I’m over complicating things and there’s a simpler method? Thanks!

childof_BA.blend (455 KB)

So this is how I do it:

As you can see the “influence” driver for the second object’s Track To constraint reads the “influence” for the first, so the variable is a “Single Property” type and select the object - to get the “property” value; RMB-Click the influence of the first Track To and then select “Copy Data Path”, then paste this into the “Path” for the object in question. The scripted expression becomes 1 - var so when the first Track To is 0 the second is 1 - 0 or 1 and when the first is 1, the second becomes 1 - 1 or 0. It also works for all intermediate values. I used this method to move a camera from one bone travelling along a curve to another bone travelling along a second curve and did the same for the Track To constraints for the camera to move its focus point.

Trying to work out a maths option for the driver is very difficult and unnecessary as you can always “read” what one property of an object is doing by using the “Copy Data Path” option from the RMB-Click menu on any data field.

Cheers, Clock. :slight_smile:

Is the “switch” bone completely necessary? Or was it just a part of an experiment?

If it’s not, you could key frame the influence values on the constraints at the relevant point in the animation.

Sometimes the simple solutions can work well. :slight_smile:

Using one bone to switch many constraints at once is a good idea, it stops you having to remember to do each one separately, particularly if you have many interdependent constraints in your rig. Using a bone as the switch control in the armature also keeps all the actions in one object. But you can of course just keyframe them all together, me I went for the easiest option when I am animating, it’s less to things remember the more you have them automated. I also use this kind of setup for aircraft undercarriages, many flaps to rotate, many parts to move in a predetermined sequence, using this approach of just moving one bone to do the whole lot makes the animation easier.

Cheers, Clock.

Yeah. I’ve used a single control to manipulate action constrained bones for things like the opening and closing of a hand. Or other things of that nature, where I didn’t want to fiddle around with them individually. But sometimes if I want to switch the parenting of a bone for things like a hand-off, just keying the influences has worked well enough.

I suppose that’s one of the great things about Blender. You can approach a situation in a variety of ways. :slight_smile: