Blender exporter errors when parent bone has scale 0

Not sure if its worth a fix but I managed to repro anyways, using Blender 2.81 and exporter 6.3.1. Any armature with 2 bones (parent and child) will fail to export if parent has scale of 0 anywhere. I suppose its known and the workaround is simple but fwiw, I did not find any mention in the doc. Hope it helps.

Blend file attached. (76.8 KB)

Error is:
return (SystemMatrix @ matrix_world @ bpyBone.parent.matrix).inverted() @ (SystemMatrix @ matrix_world @ bpyBone.matrix)
ERROR: Matrix.invert(ed): matrix does not have an inverse

Adding @JCPalmer who might have some insights on it. In the meantime @phaselock would be great if you could share the export log if any ?

1 Like

Ok, you are the first person to hit this. That inverted() function is a library call on the blender matrix class. Getting the world matrix of a child bone is always done by getting the inverse of the parent. I do not think an exporter change is a good idea, because in addition to being a rare need, BJS also does this. I just set the y scale of the parent bone to 0.0000001. It then exports fine.

1 Like

yeah, like I said, maybe not worth a fix but it is inconsistent as child bone can accept scale of 0 and export fine. Maybe update doc ? Shrugs…