Condense Same Named Materials to Master Instance Material

If I'm missing this, I'm sorry. But My scenes have multiple objects using the same materials with the same names, but they each come into the MatEd as individual materials. This is a huge PITA when I need to change one material then propagate that change across multiple objects.

Can someone write a script that finds all materials with the same name, have the option to correlate the materials to ensure they are actually the same setup (or with in a few parameter close) then use a master material as the new instance material that replaces all other same-named materials.

Please contact me with your costs and time availability. This is a need-it-now item.

Thanks in advance,

Curtis Sponsler | AniMill

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
AniMill's picture

OK, I have one suggestion:

OK, I have one suggestion: Have a "Select First" button where it automatically selects the first check-box in each multi-copy material. Just a short-cut to speed things along.

Thanks again.

cas

AniMill's picture

Bowing down low before

Bowing down low before you... you ever need some After Effects composites or MAX production, don't hesitate to email me: c.a.sponsler[at]animill.com

Thanks!

Marco Brunetta's picture

Haha, yeah I tend to make a

Haha, yeah I tend to make a lot of those =P

Don't worry about it mate, like I said, I had bits and pieces of it around my HD, I just had to tie them up together.

Enjoy!

Marco Brunetta's picture

Cool, let me know how it

Cool, let me know how it goes.

M.

AniMill's picture

How much do I owe you?! It

How much do I owe you?! It just saved me tons of time of tedious work... MUCH appreciated.

(p.s. the first line has a misspelling: "rollout condenseMats "Condese Materials" width:275" Should be "Condense" - damned typos!

:-)

Marco Brunetta's picture

I had worked on something

I had worked on something along these lines some time ago, so I just fixed it up a bit for you. Have a look at the attached script.

When you run it, it will list all of the materials in the scene by name on a treeView. If two are more materials have the same name they will be displayed as separate subNodes of the main material node. You can use the checkboxes to choose which one of the materials will be the "master", in other words, which material will replace the others with the same name. Disabling the checkbox at the top nodes will keep the script fro doing any changes to the materials with that name.

You can double click any of the subnodes to select every object in the scene using that material, this should help you to find which one to use as a master.

It was packed together pretty quickly, so there might be some bugs in there but give it a go and let me know.

Good luck.

AttachmentSize
Condense Materials.ms 4.11 KB
AniMill's picture

Marco - I'm rebooting my

Marco - I'm rebooting my workstation then I'll give this a test. Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.