ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.

概要

vnnNode [-connected boolean] [-connectedTo string] [-listConnectedNodes] [-listPortChildren string] [-listPorts] [-portDefaultValue string string] [-queryPortDataType string] [-queryPortDefaultValue string] string string

vnnNode は、取り消し可能、照会不可能、および編集不可能です。

vnnNode コマンドは、vnnNode を操作して、そのポートと接続を照会する場合に使用します。最初の引数は、VNN ノードが配置されている DG ノードのフル ネームです。2 番目の引数は、VNN ノードのフル パス名です。

戻り値

string操作の結果

関連

vnn, vnnCompound, vnnConnect

フラグ

connected, connectedTo, listConnectedNodes, listPortChildren, listPorts, portDefaultValue, queryPortDataType, queryPortDefaultValue
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-connected(-c) boolean create
「listPorts」と一緒に使用すると、接続されたポートまたは接続されていないポートが照会されます。
-connectedTo(-ct) string createmultiuse
「listConnectedNodes」と一緒に使用すると、指定したポートに接続されているノードが照会されます。
-listConnectedNodes(-lcn) create
指定したノードに接続されたノードをリストする場合に使用します。返される結果はノード名のリストです。
-listPortChildren(-lpc) string create
指定したポートの子をリストします。
-listPorts(-lp) create
指定したノードのポートをリストします。「connected」と一緒に使用すると、返されたポートが接続されているかどうかを判断できます。
-portDefaultValue(-pdv) string string create
既定値をノード ポートに設定できます。このポートは接続できません。
-queryPortDataType(-qpt) string create
指定したポートのデータ タイプを照会します。
-queryPortDefaultValue(-qpv) string create
ノード ポートの既定値を照会します。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

// create a bifrost liquid node
// to operate VNN graph of the bifrost container
file -f -new;
polyPlane;
CreateBifrostLiquid;

// List all ports on the node
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid.postSimulationStep.if" -listPorts;

// List the ports on the node which has connections
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid.postSimulationStep.if" -listPorts -connected true;

// List the ports on the node which has no connection
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid.postSimulationStep.if" -listPorts -connected false;

// List all connected nodes
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid.postSimulationStep.if" -listConnectedNodes;

// List the connected nodes which are connected to the port "trueCase"
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid.postSimulationStep.if" -listConnectedNodes -connectedTo "trueCase";
// Result: foam.Foam

//
// another example of setting and querying the default value of a port
//
// Init scene and VNN objects
bifrost -g "test";
vnnCompound "|bifrostTest1|bifrostTestContainer1" "test" -addNode "Bifrost,Bifrost::Nodes::Math,valueInt";
vnnCompound "|bifrostTest1|bifrostTestContainer1" "test" -createInputPort "val" "int";
vnnConnect "|bifrostTest1|bifrostTestContainer1" "test.val" "test.valueInt.val";
vnnConnect -d "|bifrostTest1|bifrostTestContainer1" "test.valueInt.val" "test.val";

// Set the port default value
vnnNode "|bifrostTest1|bifrostTestContainer1" "test.valueInt" -portDefaultValue "val" "18";

// Get the port default value
vnnNode "|bifrostTest1|bifrostTestContainer1" "test.valueInt" -queryPortDefaultValue "val";
// Result: 18 //

// query the data type of a specified port
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid.postSimulationStep.if" -queryPortDataType "outputValue";

// query the children of a specified port
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listPortChildren "portName";