Delta.Save

説明

指定されたファイルにデルタ(リファレンスモードのすべての変更)を保存します。このファイルは、あとで外部ストレージとして、またはデルタを読み込むときに使用できます。

スクリプト 構文

Delta.Save( Filename );

パラメータ

パラメータ タイプ 詳細
Filename String 保存するファイルの名前

JScript の例

/*
        This example demonstrates how to save a delta
*/
NewScene(null, false);
// Create a reference model from a cube
var oRoot = Application.ActiveProject.ActiveScene.Root;
var oCube = oRoot.AddGeometry("Cube", "MeshSurface");
var emdlFileRefModel = XSIUtils.BuildPath(Application.InstallationPath(siProjectPath), "Models", "MyModel.emdl"); 
CreateModelAndConvertToRef(oCube, emdlFileRefModel );
// Add the Delta object
var oDelta = AddDelta(oCube.Model);
// Add an action of type siModificationDeltaStaticValue
var oDeltaAction = oDelta.AddAction(siModificationDeltaStaticValue);
// Add the Static value item    
var oActionDeltaItem = oDeltaAction.AddStaticValueItem(oCube + ".kine.global.posx", 10);
// To apply the modification
oDelta.Apply();
// File to save delta
var deltaFile = XSIUtils.BuildPath(Application.InstallationPath(siProjectPath), "Deltas", "MyDelta.delta");
oDelta.Save(deltaFile);

関連項目

ApplyDelta ExportDelta