I have a tool that I've written that takes blend files and converts them into quake 3 maps. This automates a ton of stuff that saves me a lot of time, but there's still several tedious steps before getting to that. One of those steps is splitting complex meshes up and generating textures and materials for each object. To keep things simple for editing, I'd like to have object name, mesh name, material name and texture name be the same for each object.
To accomplish this, I've found and used the batch rename data blocks script located here. For how great this script is, there's one thing it lacks, that being the ability to rename the active or first texture for the materials. I've attempted to access
material.texture_slots[n].name and change this value, but got an error that it was read-only.
What is the appropriate api/process to rename images attached to materials? For what it's worth, all images are packed, generated textures.