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.
Anubis's picture

hmm, such questions continued frequently

fn InstanceMatByName mat = (
	(for o in objects where o.mat != undefined and o.mat.name == mat.name collect o).mat = mat
)
 
--example usage:
InstanceMatByName (meditMaterials[1])

my recent MAXScripts RSS (archive here)

stenionet's picture

Marco Brunetta When I press

Marco Brunetta
When I press "Condense Materials" the dialog closes and nothing happens.

Kstudio's picture

Also you can find script

Also you can find script InstanceMatByName in TrackScripts pack.

Select material in Material Editor and run script InstanceMatByName.

All materials with same class and name will be convert to instance.

Marco Brunetta's picture

Piece of cake! It now always

Piece of cake! It now always select the first entry when creating the tree. How's that?

AttachmentSize
Condense Materials-2.ms 4.16 KB
AniMill's picture

You are sick dude! ;-) OK,

You are sick dude! ;-)

OK, so ya want a tough one? How about a silly little File Loading/Saving Progress Indicator?

I can't stand that all MAX says when you are saving files is: "Saving..."! I've got big-ass files I'm saving and I have no idea how long to wait before I can click on the screen (or take a bathroom break).

If there was a way to make a UI Dialog Box with an accurate saved Mbyte -vs- total Mbytes and estimated time progress bar - that'd be fab! Even better, would there be a way to modify the standard interface in the lower-left corner to replace or add-to the "Saving..." message.

This one I bet you could sell!

I still want to get you something for your help - seriously, NewEgg, Amazon, Apple giftcard?

Marco Brunetta's picture

That actually IS a tough

That actually IS a tough one. Even tough I can call the save function from maxscript, I don't have any control over what it does or have any feedback. And since the max format is not opensource I can't neither reproduce it. So I'm gonna pass on that one, sorry.

Well... if you'r feeling generous, there's always my PayPal account at [email protected] . All donations go towards getting more beer on weekends. =D

Take care.

AniMill's picture

I do insist! Beer's to

I do insist! Beer's to you!

No worries on the "Save" thing. I'll just keep hammering Autodesk on that one.

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!

Comment viewing options

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