Modify existing materials
Hi. I'm new to scripting and I'm currently working on script to modify existing materials that have been applied to objects.
There are several objects in the scene with different materials (and different textures) and the plan is to all unify them with certain values (self illuminating, blur, diffuse, specular, ambient etc) I can assign a *new* material to all the objects, but that's not what I want to do. I need to make a few changes (en masse) to the assigned materials and I'm not sure how to do that - me being new to scripting and all. Any suggestions? Thank you.
Comments
Thank you Insanto, that makes
Thank you Insanto, that makes a lot of sense and the code comments are appreciated as well!
And interesting there is no "purple" in MAXscript : but I worked out it was local col = color X Y Z for individual colours.
i wrote it in a way so you
i wrote it in a way so you can expand on it quite easily, you just gotta know the class of the material and the settings
if you wanna find out the class you use:
classOf meditMaterials[1] --returns class of the materialEditor's first slot
to get the propertyNames and types you use:
showproperties meditMaterials[1]
-add the class to the classFilterFN function
-add a new case for the added materialClass with it's properties you wish to change
have phun
Raphael Steves
cool, Insanto could it be
cool, Insanto
could it be possible to have a line for Vray material too ? thanx
i suggest: ( local
i suggest:
:P
Raphael Steves