Description
Adds Hair geometry to the specified object.
Scripting Syntax
ApplyHairOp( in_Objs, PresetObj )
Parameters
|
Parameter |
Type |
Description |
|
in_Objs |
Specifies the objects to be modified |
|
|
PresetObj |
Hair geometry preset: only "Hair-Default" is supported. Default Value: "Hair-Default" (Default hair preset) |
Return Value
Returns the hair object as an X3DObject.
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
|
|
|
|
SOFTIMAGE|XSI v6.01