Go to: Synopsis. Return value. MEL examples.
createHairCurveNode(
string $hsys,
string $surface,
float $u, float $v,
int $numCvs,
int $doOut,
int $doStart,
int $doRest,
int $isPassive,
string $startCurve,
float $length,
int $endHairSystemIndex[],
string $hsysGroup,
string $hsysOutHairGroup,
int $simulationType )
None
| Variable Name | Variable Type | Description |
|---|---|---|
| $hys | string | name of the hair system node |
| $surface | string | surface or mesh to attach the follicle to (set to "" if there is no surface) |
| $u | float | $v uv coordinates on the surface to attach the follicle to (if no surface 0,0 is OK) |
| $numCvs | int | number of cvs to create for the hair curve ( if a start curve is passed in it will override this value ) |
| $doOut | int | if true then create output curves for the follice |
| $doStart | int | if true then create a start curve for the follicle |
| $doRest | int | if true then create a rest curve for the follicle |
| $isPassive | int | if true then make the follicle passive |
| $startCurve | string | name of a curve to use for the start position(if "" then a curve will be created) |
| $length | float | length of hair curve to create (ignored if a start curve is specified) |
| $endHairSystemIndex | int[] | this keeps track between calls of the index of the last hair created |
| $hsysGroup | string | an existing group to parent the follices under (for no grouping set to "") |
| $hsysOutHairGroup | string | an existing group to parent the output hair curves under (for no grouping set to "") |
| $simulationType | int | 1 = dynamic, 2 = static |
sphere;
string $hsys = `createNode hairSystem`;
connectAttr time1.outTime ($hsys + ".currentTime");
int $ind[1];
$ind[0] = 0;
int $i;
for( $i = 0; $i < 10; $i++ ){
float $v = 0;
float $u = $i/10.0;
string $newHair = createHairCurveNode( $hsys, "nurbsSphereShape1", $u,$v,10, true, true, false, false, "", 3.0, $ind, "","",1);
}