// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 17 April 1997 // // // Procedure Name: // menubarHotkeyMM // // Description: // This procedure sets up a hotkey-based // marking menu for rapidly switching between // menubar tabs. // // Input Arguments: // // Return Value: // None. // global proc syncHotboxMode (string $menuSet ) // // This function is only called from the marking menus below to force setting of // a specific hotbox mode only. // { // If hotbox is in "Show All" mode then ignore if (`hotBox -q -showAllToggleMenus`) return; // Update the working menu set "mode" // if (`menuSet -q -exists $menuSet`) { hotBox -menuSetOnly $menuSet; }else { hotBox -animationOnlyMenus; } } global proc menubarHotkeyMM() // // Creates a marking menu that allows the user // to select from the menubar tabs. It reuses // the name tempMM for the name of the menu, to // ensure that there's only one of these at // any one time. // { if( `popupMenu -exists tempMM` ) { deleteUI tempMM; } string $label, $command; string $commandTemplate = "setMenuMode ^1s; syncHotboxMode ^1s"; popupMenu -mm 1 -b 1 -p `findPanelPopupParent` tempMM; $label = `menuSet -q -label modelingMenuSet`; $command = `format -stringArg modelingMenuSet $commandTemplate`; menuItem -rp "N" -label $label -c $command -enableCommandRepeat false; $label = `menuSet -q -label riggingMenuSet`; $command = `format -stringArg riggingMenuSet $commandTemplate`; menuItem -rp "NW" -label $label -c $command -enableCommandRepeat false; $label = `menuSet -q -label animationMenuSet`; $command = `format -stringArg animationMenuSet $commandTemplate`; menuItem -rp "E" -label $label -c $command -enableCommandRepeat false; $label = `menuSet -q -label dynamicsMenuSet`; $command = `format -stringArg dynamicsMenuSet $commandTemplate`; menuItem -rp "S" -label $label -c $command -enableCommandRepeat false; $label = `menuSet -q -label renderingMenuSet`; $command = `format -stringArg renderingMenuSet $commandTemplate`; menuItem -rp "W" -label $label -c $command -enableCommandRepeat false; setParent -m ..; }