Using override_materials with skeletal mesh component?

I’m trying to replace some materials in a skeletal mesh component using the new UE4 python plugin.
I can get the component and even display the name of the skeletal mesh all right, so i’m sure i work with the right skeletal mesh component.
But when trying to list the materials, using the override_materials array:

I only get an empty array.

this works

SKMesh = SMTarget.get_editor_property(“SkeletalMesh”)

this gives an empty array

MatArray = SMTarget.get_editor_property(“override_materials”)
print ("{}".format(MatArray))

Any idea ?

Got it.
The override_materials array is empty until you manually override one of the materials.
So to get the original list of materials, we have to load the skeletalmesh and get its materials array.
Then create a new array containing modifications, and finally set this new array as the override_materials array with set_editor_property(“override_materials”, MyNewMatArray)