I’m trying to change the material assigned to certain faces.
I thought that bpy.data.objects[…].data.polygons[…].material_index would do the trick, but this property seems revert back to its original value as soon as I switch out of edit mode (bpy.ops.object.model_set(mode=“OBJECT”)).
I’m assuming that polygons and faces are the same thing here.