Delta.Target

Delta.Target

説明

この Delta に関連付けられているリファレンスモデルの名前をStringとして設定したり、戻したりします。

C#構文

// get accessor

String rtn = Delta.Target;

// set accessor

Delta.Target = String;

JScript の例

/*

	This example demonstrates how to change the target reference container

*/

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 );

// Create a cone

var oCone = oRoot.AddGeometry("Cone", "MeshSurface", "Proxy3DObj");

// Create a reference model

var emdlFileRefModel1 = Application.InstallationPath(siProjectPath) + "/Models/MyModel1.emdl";

CreateModelAndConvertToRef(oCone, emdlFileRefModel1);

// 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);

// Change the target reference container

oDelta.Target = oCone.Model.Name;

// Update the reference

UpdateReferencedModel(oCone.Model.Name + "," + oCube.Model.Name);