Thread: X-Ray question
View Single Post
# 2 15-07-2006 , 07:12 AM
jsprogg's Avatar
Lifetime Member
Join Date: Feb 2004
Location: Chicago
Posts: 1,712
Ok this should get you going

Copy & past this to the script editor then middle mouse button drag to your shelf.

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;
}