That would require 3 seperate conditional expressions.
The transparency is a triple float. Just like a vector.
I tried it again and it seems to be working now. Must have mistyped something i guess.
But it works and it's sitting nicely on my shelf now.
vector $vTransparency = `getAttr "lambert1.transparency"`;
if ($vTransparency == <<0,0,0>> ){
setAttr "lambert1.transparency" -type double3 0.5 0.5 0.5 ;
print "\nSet transparent\n";
}else{
setAttr "lambert1.transparency" -type double3 0 0 0 ;
print "\nSet opaque\n";
}
Thanks for thinking along.
Last edited by Eelco; 24-09-2007 at 06:16 PM.