## ApplyHairOp

### Introduced

v2.0

### Description

Adds Hair geometry to the specified object.

### Scripting Syntax

    oReturn = ApplyHairOp( in_Objs, PresetObj );

### Return Value

Returns the hair object as an X3DObject.

### Parameters

Parameter | Type | Description
--- | --- | ---
in_Objs | Selection list | Specifies the objects to be modified
PresetObj | String | Hair geometry preset: only "Hair-Default" is supported. Default Value: "Hair-Default" (Default hair preset)

### Examples

#### 1. VBScript Example

    ' Create a grid and generate hairs from it.
    CreatePrim "Grid", "MeshSurface"
    ApplyHairOp

#### 2. JScript Example

    //Demonstrate how to create Hair and then access it in the Object Model
    newscene("",false) ;
    var oGrid = ActiveSceneRoot.AddGeometry( "Grid", "MeshSurface", "HairyGrid" ) ;
    // Add hair to the grid
    ApplyHairOp( oGrid ) ;
    // The newly created hair object can be retrieved as a
    // child of the Grid
    var oHair = oGrid.Children.Item( "Hair" ) ;
    // Actual interesting parameters of the hair are found on the Primitive
    var oHairPrim = oHair.ActivePrimitive ;
    // Turn on display of the actual hairs
    oHairPrim.Parameters( "DisplayType" ).Value = 1
    oHairPrim.Parameters( "FrizzRoot" ).Value = 5
    oHairPrim.Parameters( "FrizzTip" ).Value = 80

### See Also

ApplyOperator ApplyOp ApplyGenOp ApplyTopoOp Hair Operators