Modifing the FBXSceneImporter (Materials)


i was digging into the code the whole day. So i have found a lot of code but i couldn´t add or modifing it properly.

Here is what i was trying to achieve:

If you import with the FBXSceneImporter you can assign materials.

It would be nice to not simply assign the material, but to let it make an instance of it and copy the imported color value to the material instance. This is possible with the standart importer too.
So if someone can throw me a hint which code does the trick that would be much appreciated. I would have shown more found code, the problem is, i lost interesting search results in Visual studio three times and can not refind them.
My guess is, that it could be done by copying the code from the standart editor and implement it to the functions inside the fbxscene importer.


This is a bit tricky but i know its not impossible. If done right, it would be possible to say, hey this Material is derived from plastic, so it makes an instance from plastic_mat and colors it in the color contained in the fbx for diffuse. That would be so neat.

Edit: So i found some interesting code parts. Is this the right way i am heading to / am i close ? This has something to do with the window itself right ? That seems to be the start to implement a new option ( instance from material). But i can´t figure out where exactly.