replace every material slot of LODs with python


I would like to get current material of each LODs and replace it with its child material instance.
I found a post which is very similar to my issue : Change every LOD's material slot ? · Issue #501 · 20tab/UnrealEnginePython · GitHub
But it does not work any more.

Any one who has a good idea about that???


I wrote this a while ago, sets mats based on the slot names, can tailor it to your needs, change the txt ext to .py