0
$\begingroup$

I want to remove a driver that is driving to "Enabled" in the constraint of posebone through Python command.

If it is a driver for the transform of the posebone, I know how to do it.

bpy.data.objects["Armature"].pose.bones[name].driver_remove('location')

So how do I access or remove driver set to the properties of the constraint?

I searched by the following script, but could not find it.

print(bpy.data.objects["Armature"].data.animation_data.drivers)
$\endgroup$

1 Answer 1

0
$\begingroup$

If you just right click a property and select "Copy as Driver" it will give you the value in question.

enter image description here

Seems like this does the trick:

const = bpy.data.objects["Armature"].constraints["Clamp To"]
const.driver_remove('influence')
$\endgroup$
1
  • 1
    $\begingroup$ Fantastic! I got it. Thank you! $\endgroup$
    – so1
    Aug 2, 2022 at 17:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .