The "broken" armature downloadable from SL Wiki Bento Testing, repaired in this file from data in avatar_skeleton.xml, available in viewer > Character.
New working file (old one corrupted). Started with empty file and appended from old file: references avatar.skeleton.xml, male_2016_08_05.dae and Skeleton.Male with BaseMale mesh, and new working armature and mesh: FittedBentoMale.
TO DO: fix the bone custom properties. So far I've winnowed the problem down: mBones must have rest_mat values, which define the resting bone pose, bind_mat which defines the relationship betwen armature and rigged mesh and is created by Blender (when it's wrong or missing it causes a gap between head and body). I'm still not sure what settings collision bones need; I'm getting a variety of sets of numbers from different ways of Blender can calculate dae exports and imports.
(I think I referred to this new file with reversed name earlier, having a particularly dyslexic day, sorry)
Replacing with "DefaultMaleBentoFitted.blend. The old file got corrupted because it was too big, I think. Blender doesn't manage multiple armatures well.
Left-right mismatches, and I don't know if they're within the rounding tolerances, as I don't know what those tolerances are. One other issue: some left -right pairs are listed with left first, others with right first
to do: convert collision bone custom property settings to X-Axis mirroring, figure out what adjustments are needed for the Bento-rigged mesh objects, and figure out the mBone custom properties matrices.
Finished repairing the Bento male armature: male_2016_08_05.dae, details will be in my blog.
Added collision weights from Skeleton.Male's mesh to the male_2016_08_05.dae Bento-rigged mesh. LEFT_HANDLE and RIGHT_HANDLE had to be added using Blender AutoWeight. To give us a model for testing the repaired armature. I'm trying to replicate the inworld default system male, as much as possible, from the SLWiki downloads.
the usual suspects: male_2016_08_05.dae, avatar_skeleton.xml, Skeleton.Male.blend. TO DO: figure out if it needs adjustments to the mBone custom properties, and make the new strings.
I changed my mind (and might again) on whether it's better to put the armatures +Y forward in Blender with -X setting on collada export, or +X forward in Blender with +Y settings on collada export. Probably the former (because Blender only mirrors armature settings on the X axis), which means I need to check the X, Y coordinates again in the custom property settings.
Yesterday's testing showed me that, in the Blender data, we must have matrix data from the Project Bento Resources website. SL Wiki not exaggerating when they call those files "broken". So I jammed the matrices from male_2016_08_05.dae into the spreadsheet and am sorting it out. I expect it will be some kind of conversion arithmetic (from Maya to Blender), as I did with avatar_skeleton.xml from LL's viewer stuff and the 2014 files from the Rigging Fitted Mesh website.
the armature is working fine with Appearance sliders inworld, but is distorting the mesh on import if there are any verts weighted to collision bones. Not obvious in the test models - the worst of the bad deform is solved. But it's there, obvious in Roth. Part of the problem is +X forward vs. +Y forward orientation in Blender before exporting, not completely solved by the Blender-provided SL-OS rigged mesh export settings. Part of it is in bone roll settings. The rest probably in the bind_mat and rest_mat settings imported with the bento dae files. I'll try going back to my original rebuilt armature and add in cust props with more tests as I go, til I find the bug.
And using the new export preset. There's a copy out at RuthAndRoth sim. Import to opensim: I increased the LOD settings from the default, used a simple cube for physics.
fixed copy errors in collision bone custom properties
fixed export error and made a new preset
cleaned up the data: packed images, deleted orphans etc.
I'm still not sure how many decimal places the server is reading from the dae uploads. The SL Wiki downloads have collision bone scale values up to 17 decimal places, but avatar_skeleton.xml has no more than two. I'm pretty sure it's not 17, but it may be more than two.