ExportICECompoundNode

導入

v7.0

詳細

指定の ICECompoundNode をファイルに書き出します。

スクリプト構文

oString = ExportICECompoundNode( [Compound], FullPath, Directory, Name, Version, [Private], [ForceEmbedded] );

戻り値

文字列

パラメータ

パラメータ タイプ 説明
Compound 選択リストまたは選択 書き出す対象のコンパウンド

デフォルト値:引数が指定されていない場合は、現在の選択が使用されます。

FullPath 文字列 このパラメータを使用すると、コンパウンドはその特定のパスとファイル名に書き出されます。
Directory 文字列 FullPath が定義されていない場合、パスの作成には Directory、Name、Version が使用されます。 拡張子は、Private フラグに基づいて自動的に指定されます。
Name 文字列 コンパウンドの名前。 定義されていない場合、コンパウンドの現在のクラス名が使用されます。 この値がコンパウンドのクラス名と異なる場合、新しいコンパウンドのクラス名としてこの値が使用されます。
Version 文字列 コンパウンドのバージョン。 定義されていない場合、コンパウンドの現在のバージョンが使用されます。
Private Boolean コンパウンドを XML 形式で書き出すか、エンコードされたバイナリ バージョンとして書き出します。 非公開で書き出されたコンパウンドは ICE Tree ビューで編集できず、すべての内部コンパウンドは ForceEmbedded として保存されます。

デフォルト値: false

ForceEmbedded Boolean true の場合、すべての内部コンパウンドがファイル内に保存されます。 false の場合、書き出されたコンパウンドがファクトリ ノードであるかのように保存されます。

デフォルト値: false

JScript の例

/*

	This example demonstrates how to use the ExportICECompoundNode command to

	create both an XML and private (binary) version of a compound.

*/

NewScene(null , false);

CreatePrim("Cone", "MeshSurface");

ApplyOp("ICETree", "cone", siNode, siPersistentOperation, null, siConstructionModeModeling);

// Create a new ICE Compound

AddICECompoundNode("Set Data", "cone.polymsh.ICETree");

SetValue("cone.polymsh.ICETree.Set_Data.Reference", "Self.PointPosition");

AddPortToICENode("cone.polymsh.ICETree.Set_Data.Value", siNodePortDataInsertionLocationAfter);

SetValue("cone.polymsh.ICETree.Set_Data.Reference1", "Self.PointVelocity");

AddPortToICENode("cone.polymsh.ICETree.Set_Data.Value1", siNodePortDataInsertionLocationAfter);

SetValue("cone.polymsh.ICETree.Set_Data.Reference2", "Self.Color");

CreateICECompoundNode("cone.polymsh.ICETree.Set_Data", "PointValues");

// Export a public version of the compound (using XML format)

var userCompounds = XSIUtils.BuildPath( Application.InstallationPath(siUserPath), "Data", "Compounds" );

var exportPath = XSIUtils.BuildPath(userCompounds, "PointValues.xsicompound");

XSIUtils.EnsureFolderExists(exportPath, true);

var pubCmpd = ExportICECompoundNode("cone.polymsh.ICETree.PointValues", exportPath);

Application.LogMessage(pubCmpd);

SetValue("cone.polymsh.ICETree.PointValues.Set_Data.Value_x", 5);

SetValue("cone.polymsh.ICETree.PointValues.Set_Data.Value_y", 5);

SetValue("cone.polymsh.ICETree.PointValues.Set_Data.Value_z", 5);

// Export a private version 

Application.LogMessage( ExportICECompoundNode("cone.polymsh.ICETree.PointValues", "", 

	userCompounds, "MyPrivatePointValue", "1.1", true) );

// INFO : <user_path>\Data\Compounds\PointValues.xsicompound

// INFO : <user_path>\Data\Compounds\MyPrivatePointValue.1.1.xsicompoundp

関連項目

CreateICECompoundNode EditExposedParamInICECompoundNode EditICECompoundPPGLogic EditICECompoundProperties GetICECompoundPortProperties GetICECompoundProperties ICECompoundNode