View Full Version : Getting access to different material levels
02 February 2005, 08:33 AM
Could someone shed some light on how to change a value in the material editor / material
on all levels.
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 :)
02 February 2005, 06:35 AM
Fist of all, what do you mean by levels? Different Maps in the material? Different Materials in a MultiSubobject Material?
02 February 2005, 08:28 AM
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
02 February 2006, 09:00 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.