Help, what is the Python Script API to change a StaticMesh's Material?

I mean the Material Slot in StaticMesh Editor. I want to batch change static mesh asset’s material.
I’ve explored the help(unreal.StaticMesh), but there is nothing about Material Slots Editor set property.

Thanks in advance.

unreal.StaticMesh.set_material(material_index, new_material)

Hope that helps :slight_smile: I’m actually looking for how to set materials on Skeletal Meshes. Let me know if you found a way for that :stuck_out_tongue:

Hi, Thanks, I’ve switched to use the open source UnrealEnginePython Plugin, it’s very simple and exposed tons of API with great example, from where I can build my own script very easily.
Check out this tutorial, there is the example solves your problem.