I have a head model with a lot of shape keys that I don't need. I only need one shape key which is ("mouthOpen"). How can I delete all shape keys excluding the mouthopen ? I'm a beginner level at python.
This is my attempt:
bpy_obj = bpy.context.active_object
index = bpy_obj.data.shape_keys.key_blocks.keys()
for ob in index :
if index.index('mouthOpen'):
bpy.ops.object.shape_key_remove(all=False)
else:
bpy.ops.object.shape_key_remove(all=True)