Hello I need to write a script to change the ambient occlusion attributes on any mia material , bassically I need to change Samples , Distance, Ambient Shadow Color and Ambient Light color to all selected objects., Im new to Mel so I’m having a lot of problems finding the best way to do so, I have been reading a lot of tutorials and the maya help files, but I can’t make it work , sounds easy but for me is taking for ever.
I just need to know how to list materials for the selected objects
this is my approach:
string $sel[] =ls -sl -mat
;
// Result: //
(nothing results of this) “I need to get the following result but just for the selected objects”:
[b]string $sel[] =ls -mat
;
// Result: lambert1 particleCloud1 Green red Blue Yellow Purple mip_matteshadow1 phong1 phong2 phong3 phong4 //
[/b]this way I can change any attribute for the selected materials…
PLEASE HELP