## ActivateFCurve

### Description

Activates or deactivates an entire curve or just a region of the curve.
ActivateFCurve is the command equivalent of the same functionality available in the DopeSheet. It should be used when trying to emulate the DopeSheet behavior.

### Scripting Syntax

    ActivateFCurve( [InputObjs], Activate, [StartFrame], [EndFrame], [Type] );

### Parameters

Parameter | Type | Description
--- | --- | ---
InputObjs | String | List of animatable parameters (for example "cone*/kine.local.pos"). This parameter uses the Type parameter to interpret which parameters to use in this way: - If Type == siInputParameters then InputObjs is used exactly as input (either from the specified list or the animatable parameters on the selected objects). - If Type == siAnimatedParameters then InputObjs is expected to be a list of objects on which each animatable parameter will be affected. - If Type == siAllAnimatedParameters then the value of InputObjs is ignored and instead the command uses all animated parameters on all objects in the entire scene. Default Value: If no value is specified for this parameter, the Object List will use the selected objects or parameters respecting the scope indicated by the Type argument.
Activate | Boolean | Activate or Deactivate the entire curve or the input range.
Possible Values: | Description:
0 | False
1 | True
StartFrame | Double | Start frame of the region of the fcurve(s) you want to operate. Leave both Start and End blank for entire curve. Value range -Inf, +Inf
EndFrame | Double | End frame of the region of the fcurve(s) you want to operate. Leave both Start and End blank for entire curve. Value range -Inf, +Inf
Type | siParameterScope | Parameter scope of the operation Default Value: siInputParameters

### Examples

#### VBScript Example

    ' First get a primitive and animate its translation

    NewScene , False

    CreatePrim "Cylinder", "MeshSurface"

    Translate , -7.01063515498729, 5.25147709343595, -0.525147709343595, siRelative, siView, siObj, siXYZ

    SaveKey "cylinder.kine.local.posx,cylinder.kine.local.posy,cylinder.kine.local.posz", 1

    SetValue "PlayControl.Key", 25

    SetValue "PlayControl.Current", 25

    Translate , 14.8089821251417, -10.34619367662, 1.034619367662, siRelative, siView, siObj, siXYZ

    SaveKey "cylinder.kine.local.posx,cylinder.kine.local.posy,cylinder.kine.local.posz", 25

    SetValue "PlayControl.Key", 50

    SetValue "PlayControl.Current", 50

    Translate , -15.3603803957587, -0.391901275629446, 3.91901275629446E-02, siRelative, siView, siObj, siXYZ

    SaveKey "cylinder.kine.local.posx,cylinder.kine.local.posy,cylinder.kine.local.posz", 50

    SetValue "PlayControl.Key", 75

    SetValue "PlayControl.Current", 75

    Translate , 14.5726685805916, 10.9732357176274, -1.09732357176274, siRelative, siView, siObj, siXYZ

    SaveKey "cylinder.kine.local.posx,cylinder.kine.local.posy,cylinder.kine.local.posz", 75

    SetValue "PlayControl.Key", 1

    SetValue "PlayControl.Current", 1

    SetValue "PlayControl.Key", 100

    SaveKey "cylinder.kine.local.posx,cylinder.kine.local.posy,cylinder.kine.local.posz", 100

    ' Note: to see these deactivations open the DopeSheet on the cylinder

    ' Deactivate the entire posx FCurve

    ActivateFCurve "cylinder.kine.local.posx", False

    ' Reactivate the entire posx FCurve

    ActivateFCurve "cylinder.kine.local.posx", True

    ' Deactivate the range 20 - 60 on the posx FCurve

    ActivateFCurve "cylinder.kine.local.posx", False, 20, 60

    ' Reactivate the range 20 - 60 on the posx FCurve

    ActivateFCurve "cylinder.kine.local.posx", True, 20, 60

### See Also

FCurve Sequence ScaleAndOffset