Scripting a vray texture input gamma


#1

So there is a mel script:

vray addAttributesFromGroup “file1” “vray_file_gamma” 1;

This will take file1 and turn on the texture input gamma attribute for it.
So far so good.

My question is, suppose I want to apply this to 50 textures? Is there a way to modify this script to add that attribute to all the selected texture files and not just “file1”?

Please advise.
Thanks!


#2

This actually worked:

string $selected[] = ls -sl;
for ($member in $selected)
{
vray addAttributesFromGroup $member “vray_file_gamma” 1;
};


#3

Thanks for the vray command, your question was more helpful than the answer which you solved it in 3 mins… :smiley: