// toggleUI.mel // // // Author D. Parisi // // eMail: dlparisi@yahoo.com // // Creation Date: February 13 2001 // // // Description: // Toggle Hide UI/Restore UI // // Input Arguments: // None. // // Return Value: // None. // global proc toggleUI() { // // Define current display settings // int $cb = `isChannelBoxVisible`; int $sl = `isStatusLineVisible`; int $sh = `isShelfVisible`; int $lb = `isLayerBarVisible`; int $ts = `isTimeSliderVisible`; int $rs = `isPlaybackRangeVisible`; int $cl = `isCommandLineVisible`; int $hl = `isHelpLineVisible`; int $ae = `isAttributeEditorVisible`; // // Check status of display elements... // Hide UI if any are visible, otherwise Restore UI. // if ($cb == 1) setAllMainWindowComponentsVisible 0; else if ($sl==1) setAllMainWindowComponentsVisible 0; else if ($sh==1) setAllMainWindowComponentsVisible 0; else if ($lb==1) setAllMainWindowComponentsVisible 0; else if ($ts==1) setAllMainWindowComponentsVisible 0; else if ($rs==1) setAllMainWindowComponentsVisible 0; else if ($cl==1) setAllMainWindowComponentsVisible 0; else if ($hl==1) setAllMainWindowComponentsVisible 0; else if ($ae==1) setAllMainWindowComponentsVisible 0; else setAllMainWindowComponentsVisible 1; }