View Single Post
# 6 24-09-2007 , 06:12 PM
Eelco's Avatar
Registered User
Join Date: Oct 2004
Location: In my dreams
Posts: 152
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. user added image


Portfolio: https://www.sharecg.com/pf/Dieko

Last edited by Eelco; 24-09-2007 at 06:16 PM.