I'm trying to delete shape key drivers using Python, to clean up scenes. However, I cannot delete some drivers for previously deleted shapekeys:
driver_data_path = bpy.context.object.data.shape_keys.animation_data.drivers.data_path bpy.context.object.data.shape_keys.animation_data.driver_remove(driver_data_path)
brings up this error:
Traceback (most recent call last): File "<blender_console>", line 1, in <module> TypeError: bpy_struct.driver_remove(): property "key_blocks["Key 1"].value" not found
What I understand is that the
data_path is an rna path, which is changed to
key_blocks["..."].value when the shapekey is deleted. But then it cannot be found by
Is this a bug, or is there another way to delete drivers?