// =========================================================================== // 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. // =========================================================================== // // // Description: // This script is executed when a new scene file is created. It will create // panels if required or use existing panels. // // Creation Date: Dec 1998 // global proc string copyTemplateBrushToSelected() { // Get the default/template/current brush. string $brush = `getDefaultBrush`; // Get the selection list. Currently, we get all brushes on the selection list // except if a suface is selected, we do not get the brushes of it's COS. To get // the brushes of the COS, change the 2 in the following line to 3. string $nodes[] = `getBrushes 2`; string $node; int $i =0; int $j = size( $nodes ); for ($node in $nodes) { // Check to see if this selected item is indeed a brush. It really should be. if (`nodeType $node` == "brush") { if( objExists($node +".notes") ) { if( catch(`deleteAttr -at "notes" $node`) ) { string $fmt = uiRes("m_brushPresetSetup.kCouldNotDeleteDynAttrNotes"); error( `format -s $node $fmt` ); } } copyNode $brush $node; brushStartSetup( $node, 1 ); } } return $brush; }