[Closed] Getting access to different material levels
Hi!
Could someone shed some light on how to change a value in the material editor / material
on all levels.
example :
I would like to have a script that went through all the different materials and checking if they had a propery named “sample” and return that value to me and do a math operation on it.
The closest answer i could find was the
“for i in meditMaterials where hasProperty i “samples” do i.samples = i.samples/2”
but this only adresses materials on the meditMaterials.samples levels, forinstance the sss shader with mentalray.
How could i adress this to to all materials on all levels?
And how would one do the return value of a object/material/light property?
Im using max7 btw, and any answer is highly appreciated
-theo
Fist of all, what do you mean by levels? Different Maps in the material? Different Materials in a MultiSubobject Material?
sorry for the badly formulated question
By levels i mean that its checking if any of the materials contains any other materials, sub.materials. multisubobjects everything.
Basically runs down throu all the “levels” of a material, in my case, containing the word “samples”
My scripting knowledge is somewhat limited you might say
Hope this helps