## ActionSource.PartialOffload

### Introduced

v4.0

### Description

Partially offloads the fcurve items one or many action sources for a given range of frames. Note that this applies only to FCurve items in the action.
The action source needs to have an external storage in order to be able to execute this command. Before offloading an action source, if the action is dirty it will be exported. Once offloaded or partially offloaded, an action source will never export the data again. When an action source is partially offloaded, the status parameter of the source is reset to 1 (roughly equivalent to the siAssetStatusPartiallyLoaded enum value.

### C# Syntax

    ActionSource.PartialOffload( Int32 in_dStartFrame, Int32 in_dEndFrame, Boolean in_bRemember );

### Scripting Syntax

    ActionSource.PartialOffload( FrameStart, FrameEnd, [Remember] );

### Parameters

Parameter | Type | Description
--- | --- | ---
FrameStart | Integer | The frame to start offloading the fcurve keys. If smaller than AnimStart parameter on the action, AnimStart will be used instead.
FrameEnd | Integer | The frame to end offloading the fcurve keys. If greater than AnimEnd parameter on the action, AnimStart will be used instead.
Remember | Boolean | If true, the range of frames will be appended to the OffloadedRanges parameter of the action, so when the scene is reloaded the partial offload will be processed. If false, the range of frames is only temporarily offloaded. Default Value: false

### Examples

#### JScript Example

    /*
    This example demonstrates how to partially offload an animation source.
    */
    NewScene( null, false );
    // Create an animation source of a sphere.
    CreatePrim("Cone", "MeshSurface", null, null);
    Translate(null, -7.85065649868519, 0.715575131336405, -7.15575131336405E-02,
            siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null);
    SaveKey("cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 1, null, null);
    SetValue("PlayControl.Key", 10, null);
    SetValue("PlayControl.Current", 10, null);
    Translate(null, 4.19500728937374, 7.06630442194682, -0.706630442194682,
            siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null);
    SaveKey("cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 10, null, null);
    SetValue("PlayControl.Key", 20, null);
    SetValue("PlayControl.Current", 20, null);
    Translate(null, 4.25493596493627, -7.84151081422792, 0.784151081422792,
            siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null);
    SaveKey("cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 20, null, null);
    SetValue("PlayControl.Key", 30, null);
    SetValue("PlayControl.Current", 30, null);
    Translate(null, 4.1350786138113, 7.57317013997673, -0.757317013997673,
            siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null);
    SaveKey("cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 30, null, null);
    SetValue("PlayControl.Key", 40, null);
    SetValue("PlayControl.Current", 40, null);
    Translate(null, 2.21736099581185, -7.48372324855972, 0.748372324855972,
            siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null);
    SaveKey("cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 40, null, null);
    CreateModel(null, null, null);
    SelectObj("Model.Cone", null, null);
    StoreAction("", "Model.Cone.kine.local.sclx,Model.Cone.kine.local.scly,"
            + "Model.Cone.kine.local.sclz,Model.Cone.kine.local.rotx,Model.Cone."
            + "kine.local.roty,Model.Cone.kine.local.rotz,Model.Cone.kine.local."
            + "posx,Model.Cone.kine.local.posy,Model.Cone.kine.local.posz,Model."
            + "Cone.kine.global.sclx,Model.Cone.kine.global.scly,Model.Cone.kine."
            + "global.sclz,Model.Cone.kine.global.rotx,Model.Cone.kine.global.roty"
            + ",Model.Cone.kine.global.rotz,Model.Cone.kine.global.posx,Model.Cone"
            + ".kine.global.posy,Model.Cone.kine.global.posz", 2, "simplemove",
            true, 1, 40, false, false);
    // Add a clip of the source in the mixer
    SelectObj("Model", null, null);
    AddTrack("Model", "Model", 0, null, null);
    AddClip("Model", "Sources.Animation.Model.simplemove", null,
            "Model.Mixer.Mixer_Anim_Track", 1, null, null, null, null);
    SetValue("PlayControl.Key", 20, null);
    SetValue("PlayControl.Current", 20, null);
    // We need to set the external storage to external if we want to be able
    // to offload the source
    SetValue("Sources.Animation.Model.simplemove.storage", 3);
    var oAction = GetValue("Sources.Animation.Model.simplemove");
    // Now offload the fcurve in the section of frames 10 to 20
    oAction.PartialOffload( 10,20, false );
    LogMessage(oAction.status.Value);
    LogMessage(oAction.OffloadedRanges.Value);
    // Note that this partial offload as not been added to the OffloadedRanges parameter of the source.
    // reloading the action will dispose the temporary offloaded ranges
    oAction.Reload();
    oAction.PartialOffload( 12,22, true );
    LogMessage(oAction.status.Value);
    LogMessage(oAction.OffloadedRanges.Value);
    // Expected result:
    //INFO : 1
    //INFO :
    //INFO : 1
    //INFO : 12,22

### See Also

PartialOffloadAction ActionSource.Offload