Complete scripting newbie here.
The thread title says it all. I have a bunch of objects in a scene of which none are using the same material, but some materials share the same diffuse color. There are three different colors in total.
Now I want to reduce all of the materials used by the scene objects to one per color, so that in the end no more than three materials are in use.
If any of you decide to help me with this, could you maybe also explain how you go about solving a problem like this? Is it just general coding experience? I don’t want to have to bother you people with questions like this too often.