// =========================================================================== // 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: 26 April 2005 // // Procedure Name: // buildToolOptionsMM // // Description: // This procedure creates the popup/marking menu // for current tool options (ctrl+shift RMB) // that gets attached to the main view panes. // This menu builds dynamically, and changes its // contents based on what is the current tool. // // Input Arguments: // The parent item to parent the popup menu to. // // Return Value: // None. global proc buildToolOptionsMM(string $parent) { if(`exists DRUseModelingToolkitMM` && DRUseModelingToolkitMM($parent)) { return; } string $tool = `currentCtx`; string $class = `contextInfo -c $tool`; string $scriptName = $class + "OptionsPopup"; if (`popupMenu -query -exists $parent`){ popupMenu -edit -deleteAllItems $parent; } else { return; } if(`exists $scriptName`) { setParent -menu $parent; eval $scriptName; setParent -menu ..; } }