MEL Script make selected object XRAY


1. Copy Code

//Xray
string $sel[];
int $temp[];
int $value;
$sel = `ls -sl -dag -ap -typ surfaceShape`;
for ($obj in $sel){
$temp = `displaySurface -q -xRay $obj`;
$value=$temp[0];
if($value==1)
displaySurface -xRay 0 $obj;
else
displaySurface -xRay 1 $obj;
};


to turn of and on below

//Xray
string $sel[];
int $temp[];
int $value;
$sel = `ls -sl -dag -ap -typ surfaceShape`;
for ($obj in $sel){
$temp = `displaySurface -q -xRay $obj`;
$value=$temp[0];
if($value==1)
displaySurface -xRay 1 $obj;
else
displaySurface -xRay 0 $obj;
};

Comments