// =========================================================================== // 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. // =========================================================================== // // // Creation Date: 2003 // // Description: Create hairs on selected objects // global proc initHairCurveDisplay( string $curve, string $type ){ if( !objExists( $curve) ){ return; } if( $type == "start" ){ return; } string $layer = objectLayer( $curve ); if( $layer != "defaultLayer" ){ return; // we can't set draw overrides on layers } int $overrideOn = getAttr( $curve + ".overrideEnabled" ); if( !$overrideOn ){ setAttr ($curve + ".overrideEnabled") true; } if( $type == "current" ){ setAttr ($curve + ".overrideColor") 6; // or 11? } else if( $type == "rest" ){ setAttr ($curve + ".overrideColor") 12; } else if( $type == "passive" ){ setAttr ($curve + ".overrideColor") 23; } }