// =========================================================================== // 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. // =========================================================================== global proc copyBrush(string $srcBrush, string $targetBrush) { string $bName; // Find the current shelf global string $gBrushShelfTopLevel; string $currentShelf; if (`nodeType $srcBrush` != "brush") return; if (`nodeType $targetBrush` != "brush") return; string $atrs[] = `listAttr -k -w -s $srcBrush`; string $atr; string $reslt = ""; for ($atr in $atrs) { string $gAtr = "getAttr " + $srcBrush +"." + $atr; $reslt = $reslt + "setAttr " + $targetBrush + "." + $atr + " " + eval($gAtr) + "; "; } eval($reslt); }