I'm trying to delete the driver of specific shape keys. I have used the code below, which deletes a shape key, using
key_idx to select an entry key from the list.
However, the 'index' values of that list are defined by the drivers rather than the shape keys. That is to say,
fcurves.remove(fcurves) will find the third shape-key-with-a-driver, and not the driver of the third shape key.
This means that I can't use
key_idx = active_shape_key_index to delete a specific shape key, since I've no way of telling how many previous shape keys have drivers, if any.
bpy.ops.anim.driver_button_remove(all=True), but that just returns
How can I specify a shape key driver to be deleted, when it's unknown at what 'driver index' that driver sits at?