I’m trying to create a script that will delete any UV maps named “UVMap”. In the info window, I see that the following method is used:
bpy.context.object.data.active_index = 0
bpy.ops.mesh.uv_texture_remove()
It looks like the active_index method is used also in Vertex Colors, so this is not specific to only UV Maps. How can I access the UV Map by name?