// =========================================================================== // 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: // A utility to return the names of follicle and outcurve // for a hair system, and create them if they // do not yet exist. // global proc string[] getHairSystemGroups(string $hsys, int $create) { string $groupNames[2]; string $hsysParent[] = `listTransforms $hsys`; if( size($hsysParent) > 0 ){ $groupNames[0] = ($hsysParent[0] + "Follicles"); if( !objExists( $groupNames[0] ) ){ if( $create ){ $groupNames[0] = `group -em -name $groupNames[0]`; } else { $groupNames[0] = ""; } } $groupNames[1] = ($hsysParent[0] + "OutputCurves"); if( !objExists( $groupNames[1] ) ){ if( $create ){ $groupNames[1] = `group -em -name $groupNames[1]`; } else { $groupNames[1] = ""; } } } return $groupNames; }