ActionSource.PartialOffload

導入

v4.0

詳細

F カーブの項目の 1 つまたは複数のアクションソースを指定されたフレーム範囲で部分的にオフロードします。これはアクションのFCurve項目にのみ適用されます。

このコマンドを実行するためには、アクションソースの格納場所は外部に設定する必要があります。アクションソースをオフロードする前に、アクションがダーティな場合は書き出す必要があります。いったんオフロードまたは部分オフロードを実行すると、アクションソースではデータを二度と書き出すことはできません。アクションソースが部分的にオフロードされている場合は、ソースのステータスパラメータは 1 になります(siAssetStatusPartiallyLoaded列挙型の値とほぼ同じです)

C#構文

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

スクリプト構文

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

パラメータ

パラメータ タイプ 説明
FrameStart Integer F カーブのキーのオフロードを開始するフレーム。 アクションの AnimStart パラメータより小さい場合は、代わりに AnimStart が使用されます。
FrameEnd Integer F カーブのキーのオフロードを終了するフレーム。 アクションの AnimEnd パラメータより大きい場合は、代わりに AnimEnd が使用されます。
Remember Boolean True の場合は、フレームの範囲がアクションの OffloadedRanges パラメータに適用されます。これにより、シーンを再ロードすると部分オフロードが実行されます。FALSE の場合は、フレームの範囲はオフロードのみ実行されます。

デフォルト値: false

JScript の例

/*

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

関連項目

PartialOffloadAction ActionSource.Offload