I have a quick and dirty script to change the constraint settings for the bones of an armature:
import bpy for bone in bpy.context.selected_pose_bones: try: bone.constraints.target_space='LOCAL' bone.constraints.owner_space='LOCAL' for cons in bone.constraints: if cons.type == 'COPY_LOCATION': WHAT GOES HERE TO DELETE THE CONSTRAINT? except IndexError: pass
As you can see I also want to delete any Copy Location constraints on the bones and can't figure out how. Manually deleting generates, bpy.ops.constraint.delete() in the Info window, but adding that to the script gives me a "context is incorrect" error.