// =========================================================================== // 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. // =========================================================================== // // This script is paired with "defaultToolProperties.mel" // to display a property sheet for those tools that // have not defined property sheet of their own global proc defaultToolValues ( string $toolName ) { string $parent = (`toolPropertyWindow -q -location` + "|defaultTool"); setParent $parent; // If we can't find the icon then use the null string to // blank the picture altogether. // string $xpmName = ""; // Get the current tool // string $currentTool = `currentCtx`; if (`superCtx -exists $currentTool`) { // // If it is part of a tool group then it's harder to get the icon. // Figure out the icon of by querying the toolbox. // if ( `toolCollection -exists toolCluster` ){ string $currentButton = `toolCollection -query -select toolCluster`; if ( `toolButton -exists $currentButton` ){ $xpmName = `toolButton -query -image1 $currentButton`; } } } else if ( `contextInfo -q -exists $currentTool` ) { // // If it's a simple tool then just ask it what its icon is. // $xpmName =`contextInfo -q -i1 $currentTool`; } string $helpTag = ""; toolPropertySetCommon $toolName $xpmName $helpTag; toolPropertySelect "defaultTool"; }