// =========================================================================== // 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 June 1997 // // // Description: // This implements the Fit Selected in All Panels with a // Marking menu. // global proc buildSelectAllMM() // // Creates a marking menu that allows the user // to select All history/future. 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; } global string $MMcmd; $MMcmd = ""; popupMenu -mm 1 -b 1 -aob 1 -p `findPanelPopupParent` -pmc ("$MMcmd = \"Posted\"") tempMM; menuItem -radialPosition "W" -label (uiRes("m_buildSelectAllMM.kSelectAllInputs")) -c "$MMcmd = \"selectHistory\""; menuItem -radialPosition "E" -label (uiRes("m_buildSelectAllMM.kSelectAllOutputs")) -c "$MMcmd = \"selectFuture\""; menuItem -radialPosition "N" -label (uiRes("m_buildSelectAllMM.kEnableAllOutputs")) -c "$MMcmd = \"enableFuture\""; menuItem -radialPosition "S" -label (uiRes("m_buildSelectAllMM.kDisableAllOutputs")) -c "$MMcmd = \"disableFuture\""; menuItem -radialPosition "NW" -label (uiRes("m_buildSelectAllMM.kDeleteHistory")) -c "$MMcmd = \"deleteHistory\"" -version "2015"; menuItem -radialPosition "NE" -label (uiRes("m_buildSelectAllMM.kDeleteNonDeformerHistory")) -c "$MMcmd = \"deleteNDHistory\"" -version "2015"; menuItem -radialPosition "SE" -label (uiRes("m_buildSelectAllMM.kFreezeTransforms")) -c "$MMcmd = \"freezeTransformations\"" ; menuItem -label (uiRes("m_buildSelectAllMM.kFreezeTransformsOptions")) -c "$MMcmd = \"freezeTransformationsOptions\"" -optionBox 1 -radialPosition "SE" ; setParent -m ..; } // // Perform the action on button release // global proc buildSelectAllMM_release() { global string $MMcmd; if ($MMcmd != "") { // Process Marking menu selection switch ($MMcmd) { case "selectHistory" : selectAllInputOutput false; break; case "selectFuture" : selectAllInputOutput true; break; case "enableFuture" : disableOfSelected 1 0; break; case "disableFuture" : disableOfSelected 1 1; break; case "deleteHistory" : DeleteHistory; break; case "deleteNDHistory" : BakeNonDefHistory; break; case "freezeTransformations" : FreezeTransformations; break; case "freezeTransformationsOptions" : FreezeTransformationsOptions; break; } $MMcmd = "Processed"; } if( `popupMenu -exists tempMM` ) { deleteUI tempMM; } if ($MMcmd == "") { FrameAll; } }