# normalize all weights for vweights in mesh_bones: if vweights: tot = 0.0 for w, bone_index in vweights: tot+=w for i in xrange(vweights): vweights[i] = (vweights[i][0]/tot, vweights[i][1])