I'm trying to purge all data left by multiple appends through Python in order to get a clean blend file after my script ran.
I found a way that work for all data except shape keys
#Delete all data datalist = [ bpy.data.meshes, bpy.data.curves, bpy.data.materials, bpy.data.images, bpy.data.shape_keys] for data in datalist: for x in data.keys(): if data[x].users == 0: data.remove(data[x])
Turns out bpy.data.shape_keys has no attribute .remove()
No idea why, but how can I get rid of those useless shape keys?