## ApplyKinematicOp

### Introduced

v1.0

### Description

Applies a kinematic operator.

### Scripting Syntax

    oReturn = ApplyKinematicOp( PresetObj, [ConnectionSet], [ConnectType] );

### Return Value

Returns an XSICollection list of new kinematic operators.

### Parameters

Parameter | Type | Description
--- | --- | ---
PresetObj | String or a preset object (see SIGetPreset) | Deform and Assignment Operators
ConnectionSet | ConnectionSet | Specifies the objects connected to an operator. See OpPreset for details on the connection set required for this operator. Default Value: Currently selected objects are used as the main group. Warning: An error occurs if the connection set is invalid. Please verify the connection set required for this operator to avoid breaking your scripts.
ConnectType | siBranchFlag | Specifies the type of connection. Default Value: siUnspecified

### Examples

#### VBScript Example

    'example showing using ApplyKinematicsOp to
    'deform an object based on its motion
    dim oCone, oOps, oOp
    newscene , false
    SetValue "PlayControl.Current", 1
    SetValue "PlayControl.Out", 60
    'Create a cone that moves across the x-axis
    set oCone = CreatePrim( "Cone", "MeshSurface" )
    oCone.Parameters( "posx" ).AddFCurve2( Array( 1, -8, 50, 8 ) )
    'Add a qstretch operator that will deform the
    'cone as it moves
    set oOps = ApplyKinematicOp( "QStretch", oCone )
    set oOp = oOps.Item(0)
    oOp.Parameters( "linvel_flexampl" ).Value = 0.5
    PlayForwardsFromStart

### See Also

Kinematics Operator