Here’s the thing: skewed bones are very useful when scripting advanced muscleatures. Unfortunately, as far as I know, Blender orthogonalizes all bone pose transforms, always.
After adding a single bone to an empty scene:
>>> bpy.data.objects['Armature'].pose.bones['Bone'].matrix
Matrix(((1.0, 0.0, 0.0, 0.0),
(0.0, 0.0, -1.0, 0.0),
(0.0, 1.0, 0.0, 0.0),
(0.0, 0.0, 0.0, 1.0)))
>>> bpy.data.objects['Armature'].pose.bones['Bone'].matrix[0][1] = 1
>>> bpy.data.objects['Armature'].pose.bones['Bone'].matrix
Matrix(((0.9297882318496704, 0.520564615726471, 0.0, 0.0),
(0.0, 0.0, -1.0, 0.0),
(-0.3680947422981262, 1.3149192333221436, 0.0, 0.0),
(0.0, 0.0, 0.0, 1.0)))
(rounding errors removed for easier reading)
The resulting matrix is not useful to me. What I was hoping for would look like this:
Matrix(((1.0, 1.0, 0.0, 0.0),
(0.0, 0.0, -1.0, 0.0),
(0.0, 1.0, 0.0, 0.0),
(0.0, 0.0, 0.0, 1.0)))
Does anyone know why Blender’s bones need to be orthogonal at all times?