// =========================================================================== // 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. // =========================================================================== // // makeTubeOn // // This function turns tubes on for the current template brush, // and sets the tube generation parameters such that there is // little change in appearance. A single tube is created that // exactly follows the brush path and has the same width as // the brush. // // // // // makeTubeOn () // // // None. // // // This function turns tubes on for the current template brush, // and sets the tube generation parameters such that there is // little change in appearance. A single tube is created that // exactly follows the brush path and has the same width as // the brush. // // // None. // // makeTubeOn; // // global proc makeTubeOn() { string $brush = getDefaultBrush(); setAttr ($brush + ".tubes") 1; setAttr ($brush + ".startTubes") 1; setAttr ($brush + ".tubesPerStep") 0; setAttr ($brush + ".segments") 500; setAttr ($brush + ".elevationMin") 0; setAttr ($brush + ".elevationMax") 0; setAttr ($brush + ".azimuthMin") 0; setAttr ($brush + ".azimuthMax") 0; setAttr ($brush + ".tubeCompletion") 0; setAttr ($brush + ".branches") 0; setAttr ($brush + ".twigs") 0; setAttr ($brush + ".leaves") 0; setAttr ($brush + ".flowers") 0; setAttr ($brush + ".pathFollow") 1.0; setAttr ($brush + ".pathAttract") 0.0; setAttr ($brush + ".random") 0.0; setAttr ($brush + ".gravity") 0.0; setAttr ($brush + ".lengthFlex") 1.0; if( getAttr( $brush + ".mapMethod" ) > 1 ) { float $uRep = getAttr( $brush + ".repeatU" ); setAttr ($brush + ".repeatU") ($uRep * 100); } float $colr[] = getAttr( $brush + ".color1" ); setAttr ($brush + ".color2") $colr[0] $colr[1] $colr[2]; $colr = getAttr( $brush + ".incandescence1" ); setAttr ($brush + ".incandescence2") $colr[0] $colr[1] $colr[2]; $colr = getAttr( $brush + ".transparency1" ); setAttr ($brush + ".transparency2") $colr[0] $colr[1] $colr[2]; float $flatness = getAttr( $brush + ".flatness1" ); setAttr ($brush + ".flatness2") $flatness; float $wid = getAttr( $brush + ".brushWidth" ); setAttr ($brush + ".tubeWidth1") $wid; setAttr ($brush + ".tubeWidth2") $wid; }