Using existing materials when appeding assets with the same material from the Asset Browser

I guess the title says it all.
But lets say I have a material named M_MetalGold in my scene. Then I drag a model from the AssetBrowser that has a material also named M_MetalGold. The default behaviour is for the material on the model to become M_MetalGold.001.

Instead of replacing all the materials with existing ones, then clearing orphan data etcetc every time I append an asset, I would like for the slots with the same name as existing materials to be automatically overridden.

Does anyone know for a solution for this? Is there a script or add-on that does this? I havent been able to find anything so far.

Thanks in advance

1 Like

For future reference and anyone else who might be interested > Datablock Tool - #32 by copperplate this tool does exactly what I was asking for!

1 Like

Glad it worked for you, and thanks for the reminder! I had forgotten about this great add-on because it’s been awhile since I’ve done any mass appending of files… :smile:

Thank you so much for the addon! Its a life saver. Indispensable for building an asset library for me. I dont use a lot of unique textures - just a lot of reusing the same tilable wood/ metal/ fabric materials. This way I can assign the materials and save the asset like that and then run the script every once in a while to clean up when I use it in a project.
Worked really well in 3.0 ( didnt test in 3.1 yet ). Just needed to be copied directly in the addon folder (not nested in its own folder). I suspect it has something to do with the naming of that folder but who knows.

1 Like

Thanks for the kind words, but I don’t have the programming knowledge to make any add-ons. :smile: @vitorbalbio and @brickmack deserve all the credit for this gem! Glad it’s still working in Blender 3.

Oh oups I messed up. Thats right! :smiley: didnt go back to the original post to see whos who haha. My bad! :sweat_smile: Yup! Thank you @vitorbalbio @brickmack

1 Like

I didn’t realize it still worked, I haven’t done any maintenance on this in ages. Good to know