I need to modify an armature so each parent bone which has only one child bone will connect to it (it’s tip would move to the child bones base and merge). How would you do that? I failed after hours of trying.
PS: using 2.4.x API.
what I have so far:
for i in skeleton.bones.keys(): if len(skeleton.bones[i].getAllChildren()) < 2: # children not available for editBone for whatever reason child = skeleton.bones[i].children skeleton.makeEditable() skeleton.bones[i].tail = skeleton.bones[child.name].head skeleton.bones[i].options = [Blender.Armature.CONNECTED] skeleton.update()