Array modifier fit to curve.
Am of the opinion that Spline.calc_length() would only return the length of the non deformed local coordinates of the curve. It is unaware of what of many objects it is the data part of... trying to bend it out of shape with modifiers and shapekeys etc.
Fortunately can estimate the length simply and quickly using method below.
Add an arbitrarily small "unit" object, could be single edge, or two verts, to the scene at the location of start of curve and assign it an array modifier and fit to curve. Using defaults of array modifier, it is as long in X direction as the curve. The smaller the size of unit object the better the precision of estimate.
A little cube set to fit the length of curve
Now at any time the estimated length of curve is given by the array modified "unit" object's x dimension.
Dragging a hook on curve changes dimension of cube. UI update a bit sluggish, but you get the gist
This can be attached to rig and hidden.
bpy.types.Curve.calc_length()produced different results on a per object basis in previous versions? One way to estimate a curves length is with an arbitrarily small mesh given an array modifier set to fit curve and use its dimension. – batFINGER Dec 01 '19 at 16:10