Is there a way to lock the topology in edit mode? I wonder if there's a script for locking the topology of an object when you are editing so you are only allowed to do transformation operations, grab, rotate, scale, and so on, no "destructive" operations.

I use ManuelLab and Makehuman for making my models, and I accidentally change the topology, be ripping, extruding, edge looping, so I try to restore the original topology but then I encounter that the vertices indices are all messed up, and because of that if I try to join a shapekey from ManuelLab the shapekey gets corrupted.
I'm using ManualBastioniLab too, and do the same accidental thing, grr. Right now my fastest solution is to delete it, start a new avatar, and import the backup json file (there's a plugin somewhere  - I can't remember where I got it, google to find it). Not a perfect solution, because I've usually just fixed the overlapping UVs that ManualBastioniLab creates and will need to do it over, but it's faster than trying to repair the broken topology.