Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

vnnNode [-connected boolean] [-connectedTo string] [-listConnectedNodes] [-listPortChildren string] [-listPorts] [-portDefaultValue string string] [-queryAcceptablePortDataTypes string] [-queryIsUnresolved] [-queryPortDataType string] [-queryPortDefaultValue string] [-queryTypeName] [-setPortDataType string string] string string

vnnNode is undoable, NOT queryable, and NOT editable.

The vnnNode command is used to operate vnnNode and query its port and connections. The first argument is the full name of the DG node that the VNN node is in. The second argument is the name of the full path of the VNN node.

Return value

stringThe result of the operation

Related

vnn, vnnCompound, vnnConnect

Flags

connected, connectedTo, listConnectedNodes, listPortChildren, listPorts, portDefaultValue, queryAcceptablePortDataTypes, queryIsUnresolved, queryPortDataType, queryPortDefaultValue, queryTypeName, setPortDataType
Long name (short name) Argument types Properties
-connected(-c) boolean create
Used with "listPorts" to query the connected or unconnected ports.
-connectedTo(-ct) string createmultiuse
Used with "listConnectedNodes" to query the nodes that are connected to the specified ports.
-listConnectedNodes(-lcn) create
Used to list nodes which are connected to the specified node. The returned result is a list of node names.
-listPortChildren(-lpc) string create
List the children of specified port.
-listPorts(-lp) create
List ports on the specified node. Can be used with "connected" to determine if the returned ports have connections.
-portDefaultValue(-pdv) string string create
Set the default value to a node port The port cannot be connected.
-queryAcceptablePortDataTypes(-qat) string create
Get the list of acceptable types for the given port of an unresolved node. The acceptable types are based on the overloads that match the currently defined ports of the node.
-queryIsUnresolved(-qiu) create
Query if the node is unresolved. A node is considered unresolved if it is part of an overload set, and has at least one port that is both unconnected and has an undefined type.
-queryPortDataType(-qpt) string create
Query the data type of a specified port.
-queryPortDefaultValue(-qpv) string create
Query the default value of a node port
-queryTypeName(-qtn) create
Used to query the fundamental type of a node such as "runtimeName,libraryName,typeName"
-setPortDataType(-spt) string string create
Set the data type of a specified port.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// 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 type name of a node
vnnNode "|bifrostLiquid1|bifrostLiquidContainer1" "liquid.postSimulationStep.if" -queryTypeName;
// Result: "Bifrost,Amino,If"

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