Get Material Properties
Hello
I'm new in max scripting and I'm trying to get a list all the material properties of the selected object.
This is my first attempt...
for prop in (getPropNames $.material) do ( getProperty $.material prop )
...but no property were listed.
So, I tried to force the parameter name:
for prop in (getPropNames $.material) do ( getProperty $.material "Diffuse" )
And again, no property are listed.
I did some test to check if I wrote the values correctly:
getProperty $.material "Diffuse"
And if I put the getProperty out of the loop, it works perfectly for this specific parameter.
I checked also the loop using a print function...
for prop in (getPropNames $.material) do ( print prop )
...and it seems to work well, listing all the property names.
So... where I'm wrong?
I don't understand is why the getProperty row works only out of the "for prop" loop.
Someone can help me, please?
Comments
Wow, now it works perfectly!
Wow, now it works perfectly!
Thanks barigazy! :)
try this
bga
or
bga