Inverting material assignment on mesh
Make sure you're in object mode, then try running this script from the text editor. Save beforehand just in case.
import bpy
for mesh in bpy.data.meshes:
    for poly in mesh.polygons:
        poly.material_index = 1 - poly.material_index