Importing multiple objects with the same material

Hey guys,

this is a question that has probably been asked before and is bothering me for a while now. When you import multiple meshes (obj, fbx) that use materials with the same name, the first mesh gets the names right. Every additional mesh doesn’t use the materials already in the scene, but adds numbers (.001, .002, …) to the material name. We’re using a 3ds Max based pipeline at work and it’s really annoying when I move meshes from Max to Blender to reassign materials every time I import more than one mesh in a scene.

Is there a way to import a mesh and automatically assign the materials already existing in a scene instead of creating new ones every time? Or is there an addon that looks for materials with the same name and reassigns them if there are materials with a “.xyz” suffix?

you can try this small script

If you use it often, then you can add this to the import scripts so it does it automatically (if you understand python).

Thank you, the script in posting #11 by liero works like a charm. I have no experience with python and only litte knowledge about programming in general. It’s a good opportunity to find out how to create an addon with a clickable button somewhere in the Tools menu.

I can have a look at the import script, but maybe only by the end of the next week. But it shouldn’t be difficult to implement it.

:wink: