// =========================================================================== // 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: 24 Jul 1997 // // Description: // This procedure keeps the hotBox menu layout // in sync with the current menu set. // global proc syncHotBox (string $menuSet ) { // If hotbox is in "Show All" mode then ignore if (`hotBox -q -showAllToggleMenus`) return; // If hotbox is in multiRow mode (e.g., both Animation // and Modeling are visible, then ignore sync request. int $multiRow = (`hotBox -q -polygonsToggleMenus` + `hotBox -q -surfacesToggleMenus` + `hotBox -q -animationToggleMenus` + `hotBox -q -dynamicsToggleMenus` + `hotBox -q -renderingToggleMenus`); if ($multiRow > 1) return; // initialize hb if not already global int $gHotBoxInited = 0; if (!$gHotBoxInited) { hotBox -um; $gHotBoxInited = 1; } // hotBox has to be released before update hotBox -release; // Update the working mode // if (`menuSet -q -exists $menuSet`) { // try and set the menu set hotBox -menuSetOnly $menuSet; }else { // default to animation hotBox -animationOnlyMenus; } }