import bpy rig = bpy.data.objects["insurrectionist"] ## FIX PARENTS def reparent(b: str, newParent: str = 'DEF-spine'): rig.data.edit_bones[b].parent = rig.data.edit_bones[newParent] bpy.ops.object.mode_set(mode='EDIT') pass bpy.ops.object.mode_set(mode='POSE')