$currentPanel = `getPanel -withFocus`; $state = `modelEditor -q -wos $currentPanel`; modelEditor -edit -wos (!$state) $currentPanel;