I have made a small modification to the FBX import scripts of Blender.
It makes it possible to reuse existing materials already defined in the file when importing an FBX file.
I work with architectural visualisation often. I get models from CAD programs most often in the form of FBX and turn them into nice renders by tweaking the materials, light, furniture etc.
But very often (almost always), the visualisation work is early in the design process and the CAD project is always changing. I then receive an updated file and when importing that, I have to change all the materials again. And again. And again. Its very time consuming.
The small changes I made basically checks if the material in the FBX file is already in the Blender file by comparing the names of the materials. If the material is already defined that one is used. If not a new one is created.
I am not very experienced with the Blender code and I am not sure if this is the right way to do it or if I follow all coding guidelines etc. You are welcome to comment.
So if anybody could test this out and tell me if it works or if there is something I have done wrong etc.
And of course if it looks good, might it be considered for inclusion in official Blender and how?
Also, I feel this functionality is not specific for FBX only but all import/link workflows in Blender could use it. How would be the best way to maybe generalise it?
To test it, simply swap out the “io_scene_fbx” folder in the “…\scripts\addons” folder of the Blender install path. I have attached the modified version here.
Remember to make a copy of the one already there so you can change it back if you need to.