After I redid the cmod export script while working with John Van Vliet last week, I decided to try and take it one step further. This script has been tested on a model from the Celestia Motherlode called sts-67. I didn't change anything, I just imported the 3ds file and saved it as a blend file. Then I exported it. This model had 644 meshes and 644 material definitions. If this is not correct, let me know. So the script should be able to export almost anything. Let me know if it doesn't. This script assigns UV textures to each mesh in the cmod file with material indexing. It also assigns diffuse and specular colors to each mesh.
A problem that I still have seems to be with this model and the way Blender imports the 3ds file. Some of the normals get flipped. So the bay doors (as seen from above) and parts of the nose are invisible. I could probably edit the file and flip the normals, but that has nothing to do with the export script.
EDIT. I found problems when I worked with the Atlantis model so I deleted the script. Back to the drawing board. I'll upload it again after it passes further tests.
cartrite
