PDA

View Full Version : Material "Make Unique" via MaxScript


IonDave
12-08-2008, 03:11 AM
I'm writing a little script that will search through all materials in a scene and set them so they are unique. I cannot figure out the way to do this in MaxScript. I basically want the same functionality as the "Make Unique" button in the Material Editor. Any help will be greatly appreciated!

ghostSource
12-09-2008, 09:06 AM
i am not quite sure if this is the best way to do this, but since the Instance-manager doesn´t seem to support materials in the same way like geometry, i would do it this way:

for t in objects where t.material != undefined do t.material = copy t.material

you could add another command that modifies the name of the now-unique material as well so you can distinguish them.


greetings,
martin

CGTalk Moderation
12-09-2008, 09:06 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.