I´m working on an export script for Blender and I´m currently stuck at exporting bone weights.
Here is what i have so far(excuse me if my Python is not that clean, the syntax is pretty new to me):
v0.Inf = [0.0,0.0,0.0,0.0] for i,g in enumerate(face.vertices.groups): if not g.weight = 0.0: v0.Inf[i] = g.group + g.weight
As far as I understand this it should fill the 4 elements of my array with the sum of the group index and the weight of that particular vertex. (Note: It´s guaranteed that there are max. 4 groups)
But i´m running into some problems here: I have a test-file which has 3 vertex groups but 2 bones. How do i figure out which vertex group is assigned to which bone? There has to be some kind of connection. I can´t use the group name because the group can have a diffrent name than the bone, even if that´s a rare case.