copy and paste this into the script editor global proc toggleXray() { $currentPanel = `getPanel -withFocus`; $state = `modelEditor -q -xray $currentPanel`; modelEditor -edit -xray (!$state) $currentPanel; } highlight it all then middle mouse drag it to your shelf