How to save all curent materials before changing them via BP to return them back by FlipFlop?

Hello,
I have a lot of Actors with certain materials. I also have a blueprint which changes all of them to one single material. I need to have an option to turn them back to the initial materials after changing them to the one. Could you please let me know how to do that?
Firstly I need somehow to extract all curent materials and save them, then I need to apply them back. You can see, I have a flipflop for that. The fist click changes all materials to the one material. The second click has to turn them back. Is it possible? Do you occasianly have any ideas how to do that?
Many thanks in advance.

u are doing the thing wrong, better use a Material Parameter Collection so u can change a return to normal more easy than get all actor and change the material