View Full Version : Material "Make Unique" via MaxScript

12 December 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!

12 December 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.


CGTalk Moderation
12 December 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.