v7.5
自己インストール CustomOperator プラグインを生成するために使用可能なカスタム オペレータ ウィザードのインスタンスを作成します。生成されたウィザードは、シーン ルートの下に置かれる SDK ウィザード モデルの下にネスト化された CustomProperty です。
oReturn = CreateOperatorWizard( [DestinationDir_Optional], [PropName_Optional] ); |
CustomProperty オブジェクトとして新しく作成されたカスタム オペレータ ウィザード
| パラメータ | タイプ | 説明 |
|---|---|---|
| DestinationDir_Optional | 文字列 |
生成するプラグインが保存されるフォルダ。 デフォルト値:保存先フォルダが指定されていない場合は、ウィザードのプロパティがユーザ パスに作成されます。 |
| PropName_Optional | 文字列 |
作成するオペレータの名前 デフォルト値:カスタム オペレータ ウィザード |
/*
This example demonstrates how to create a custom operator wizard
using the CreateOperatorWizard command and then generate a very
simple custom operator using the new wizard.
*/
var sicowiz = CreateOperatorWizard();
sicowiz.OperatorName = "XYZOp";
sicowiz.ScriptLanguage = "JScript";
// Declare output port
CreatePrim("Cone", "MeshSurface", null, null);
sicowiz.OutObj = "cone.kine.global";
// Add input port
GetPrim("Null");
AddInputPortToOperatorWizard(sicowiz, "null.kine.global");
// Declare parameters
sicowiz.ParamType = "siBool";
sicowiz.ParamName = "BoolParam";
AddParamToOperatorWizard(sicowiz);
sicowiz.ParamType = "siFloat";
sicowiz.ParamName = "FloatParam";
AddParamToOperatorWizard(sicowiz);
// Generates the XYZOp implementation and plug-in
GenerateOperatorPlugin(sicowiz); |