// =========================================================================== // 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. // =========================================================================== // // // // // // // // menuItemToShelf (string $itemName) // // // None. // // // Creates a button on the current shelf that, when pressed, will // act like selecting the specified menu item. // // // string $itemName Name of the menu item. (Not the label) // // // menuItemToShelf "selectAllItem"; // // global proc menuItemToShelf (string $itemName) { global string $gShelfTopLevel; string $currentShelf; if (`tabLayout -exists $gShelfTopLevel`) { $currentShelf = `tabLayout -q -st $gShelfTopLevel`; catchQuiet( `callPython "maya.app.general.menuItemToShelf" "menuItemToShelf" {$currentShelf,$itemName}` ); shelfTabRefresh; } }