View Single Post
# 11 01-10-2007 , 06:30 AM
Funky Bunnies's Avatar
Subscriber
Join Date: Mar 2005
Location: Illinois, USA
Posts: 250
It's because the command is trying to return an array. Also, you may want to go through all selected objects.

I wrote this a while back and probably stole bits and pieces from other people :p
just put this in your user commands in the hotkey editor.
Code:
{
//XRAY TOGGLE
string $cheese[] = `ls -sl -o -s -dag -l`;

for ($object in $cheese)
   {
        // lame test to see if it's geometry
	if ( `objExists ($object + ".doubleSided")`)
	{
		int $toggle[] = `displaySurface -q -xRay $object`;
		if ($toggle[0])
		   displaySurface -xRay 0 $object;
		else
	 	   displaySurface -xRay 1 $object;
	}
   }
}


www.funkybunnies3d.com