// USAGE: // source "toggleNurbs.mel"; toggleNurbs(); /* * toggleXRay() - Main entry */ global proc toggleNurbs() { string $currentPanel = `getPanel -underPointer`; if ("" == $currentPanel) { $currentPanel = `getPanel -withFocus`; } if ("" != $currentPanel) { string $panelType = `getPanel -typeOf $currentPanel`; if ($panelType == "modelPanel") { int $state = `modelEditor -q -nurbsCurves $currentPanel`; modelEditor -e -nurbsCurves (!$state) $currentPanel; } } } // --------------------------------------------------------------------------