Get Bendy Bone base curve to match bezier curve I'm trying to get a bendy bone to match a 2 handled curve. The bendy bone setup is 3 bones: 1 bendy bone, and its head and tail bones. You can adjust the rotation of the head/tail in edit mode, and also adjust parameters like Ease In and Out to set the base pose of the bone. Here's a gif of manually adjusting a bone to match a bezier curve:



Here's the bezier curve. The left handle is 2 units from the control point on Y, and the right handle is 1 unit on X.


If we knew the relationship between the control point distances and the Ease In/Out values, then a script could snap the head/tail of the bone to a control point, and then align it with the handles, and then set some amount of Ease In/Out based on the distance to the handles to match the shape. But its not clear what the relationship between the values is. I used 2.58 and 1.34 to approximate it, but that's not exact (the base value being 1 in edit mode, and 0 in pose mode as they are added together.)

Anyone know what the proper math would be to convert these? Or is there some other way to accomplish this? I have a complex hair setup that's already based on curves, and I want to generate a bone strand for each bit. So its not practical to do by hand.
Found the answer from a BA thread asking the same question. I've tested this, and it works.

The length of each handle (hlength1 and hlength2 respectively) is based on the “ Ease In/Out ” properties, the length of the bone, and a magic-number factor (“0.5f * sqrt(2) * kappa”, where kappa = the handle length – apparently this formula allows “for near-perfect circles”). i.e.,

hlength1 = ease_in * length * 0.390464f hlength2 = ease_out * length * 0.390464f

From https://blenderartists.org/t/bendy-bone-that-matches-a-curve/1218163/13?u=oscalon, referencing https://code.blender.org/2016/05/an-in-depth-look-at-how-b-bones-work-including-details-of-the-new-bendy-bones/