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

Synopsis

vnnCompound [-addNode string] [-addStatePortUI] [-canResetToFactory string] [-connected boolean] [-connectedTo string] [-connectedToInput] [-connectedToOutput] [-create string] [-createInputPort string string] [-createOutputPort string string] [-deletePort string] [-explode string] [-inputPort] [-listNodes] [-listPortChildren string] [-listPorts] [-moveNodeIn string] [-movePort string int] [-nodeType string] [-outputPort] [-queryIsReferenced] [-queryMetaData string] [-queryPortDataType string] [-queryPortMetaDataValue string string] [-removeNode string] [-renameNode string string] [-renamePort string string] [-resetToFactory string] [-saveAs string] [-setIsReferenced boolean] [-setMetaData string string] [-setPortDataType string string] [-setPortMetaDataValue string string string] [-specializedTypeName] string string

vnnCompound is undoable, NOT queryable, and NOT editable.

The vnnCompound command is used to operate compound and its VNN graph. The first parameter is the full name of the DG node that contains the VNN graph. The second parameter is the name of the compound.

Return value

stringThe result of the operation

Related

vnn, vnnConnect

Flags

addNode, addStatePortUI, canResetToFactory, connected, connectedTo, connectedToInput, connectedToOutput, create, createInputPort, createOutputPort, deletePort, explode, inputPort, listNodes, listPortChildren, listPorts, moveNodeIn, movePort, nodeType, outputPort, queryIsReferenced, queryMetaData, queryPortDataType, queryPortMetaDataValue, removeNode, renameNode, renamePort, resetToFactory, saveAs, setIsReferenced, setMetaData, setPortDataType, setPortMetaDataValue, specializedTypeName
Long name (short name) Argument types Properties
-addNode(-an) string createmultiuse
Add a node into the compound.
-addStatePortUI(-spu) create
Pop up a window to add iteration state port.
-canResetToFactory(-crf) string create
Query if the specified compound can be reset to its initial status.
-connected(-cn) boolean create
Used with "listNodes" or "listPorts" to query the nodes or internal ports that have connections when the argument is true. If the arguments is false, return all nodes which have no connection. The other side of the connection could be another node or port.
-connectedTo(-ct) string createmultiuse
Used with "listNodes" to query all nodes that connect to the specified ports.
-connectedToInput(-cti) create
Used with "listNodes" to query all nodes which connect to any input ports.
-connectedToOutput(-cto) create
Used with "listNodes" to query all nodes that connect to any output ports.
-create(-c) string create
Create a sub compound in the specified compound. The name of the created sub compound cannot be used before in the specified compound.
-createInputPort(-cip) string string createmultiuse
Create an input port in the compound. The first argument is the name of the port. The second argument is the data type of the port.
-createOutputPort(-cop) string string createmultiuse
Create an output port in the compound. The first argument is the name of the port. The second argument is the data type of the port.
-deletePort(-dp) string createmultiuse
Delete a input or output port from the compound.
-explode(-ec) string createmultiuse
Explode a specified compound and move the nodes from it to its parent.
-inputPort(-ip) create
Used with "listPorts" to query all internal ports which connect to any input ports in the compound.
-listNodes(-ln) create
List all nodes in the compound. Can be used with other flags, such as "dataType", "connectedToInput" to query some specified nodes. The returned result is a list of node names.
-listPortChildren(-lpc) string create
List the children of specified port.
-listPorts(-lp) create
List all internal ports in the compound, including input and output ports. Can be used with other flags, such as "output", "connected" to query some specified ports.
-moveNodeIn(-mi) string createmultiuse
Move the specified node into the compound.
-movePort(-mp) string int create
Move a port to the specified index in the compound
-nodeType(-nt) string create
Used with "listNodes" to query all nodes which are specified node type in the compound.
-outputPort(-op) create
Used with "listPorts" to query all nodes which connect to any output ports in the compound.
-queryIsReferenced(-qir) create
Query if the compound is referenced.
-queryMetaData(-qmd) string create
Query the value(s) of a metadata.
-queryPortDataType(-qpt) string create
Query the data type of a specified port.
-queryPortMetaDataValue(-qpm) string string create
Query the metadata value of a specified port. The first argument is the port to query, the second is the type of metadata to query.
-removeNode(-rmn) string createmultiuse
Remove the specified node from the compound.
-renameNode(-rn) string string createmultiuse
Rename a node in the compound. The first argument is the old name of the node. The second argument is the new name.
-renamePort(-rp) string string createmultiuse
Rename a port of the compound. The first argument is the old name of the port. The second argument is the new name.
-resetToFactory(-rtf) string createmultiuse
Reset the specified compound to its initial status. The specified compound must be able to be reset.
-saveAs(-sa) string create
Used to export Compound in the Compound menu of the Node Editor. The argument is the file path to save.
-setIsReferenced(-sir) boolean create
Change the referenced status of the compound. If -sir/setIsReferenced is true, the compound will be made public, else the compound will be made private to its parent compound.
-setMetaData(-smd) string string create
Set the value of a metatada. The arguments are, in order, metadata name, metadata value to be set.
-setPortDataType(-spt) string string create
Set the data type of a specified compound port.
-setPortMetaDataValue(-spm) string string string create
Set the metadata value of a specified compound port. The arguments are, in order, port name, metadata name, metadata value to be set.
-specializedTypeName(-stn) create
Used to query the specialized implementation class names such as "Bifrost_DoWhile", or "Compound" for a normal compound

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;
// please open bifrost liquid container in node editor

// Create a sub-compound in the graph
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -create "subCompound";

// Explode a sub-compound
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -explode "subCompound";

// Create an output port in the compound
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -createOutputPort "newOutput" "Bifrost::Types::ObjectDescriptor";

// Create an input port in the compound
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -createInputPort "newInput" "Bifrost::Types::ObjectDescriptor";

// Rename a port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -renamePort "newOutput" "outputValue";

// Move a port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -movePort "newInput" 0;

// Delete a port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -deletePort "newInput";

// set the type of a internal port of the compound
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -setPortDataType "outputValue" "string";

// query the data type of a specified port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -queryPortDataType "outputValue";

// set the state value of specified port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -setPortMetaDataValue "portName" "metaDataName" "value";

// query the current state value of specified port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -queryPortMetaDataValue "portName" "metaDataName";

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

// Add a new node into VNN graph of the bifrost container
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -addNode "Bifrost,Bifrost::Nodes::Math,add";

// Rename a node
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -renameNode "add" "plus";

// Remove the node
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -removeNode "plus";

// Pop up a window to add input output port and set their data type
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -addStatePortUI;

// Query the specialized type name
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -specializedTypeName;

// Query if the compound is referenced
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -queryIsReferenced;

// Make the compound private
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -setIsReferenced false;

// List all child nodes in the specified compound
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listNodes;

// List the nodes in the specified compound which are of a specific type
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listNodes -nodeType "Math";

// List all the nodes in the specified compound which have no connections
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listNodes -connected false;

// List nodes in the specified compound which are connected to the parent's internal input
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listNodes -connectedToInput;

// List nodes in the specified compound which are connected to the parent's internal output
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listNodes -connectedToOutput;

// List nodes in the specified compound which are connected to both the parent's internal input and output port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listNodes -connectedToInput -connectedToOutput;

// Query the name of the node that is connected to a specified port
// It could be either an input port or an output port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listNodes -connectedTo "Solid";
// Result: SetDescriptorFromObject1.value

// List the names of all compound's internal ports
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listPorts;

// List the names of the compound's internal input ports
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listPorts -inputPort;

// List the names of the compound's internal output ports
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listPorts -outputPort;

// List all the compound's internal unconnected input and output port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listPorts -connected false;

// List all the compound's internal connected input and output port
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -listPorts -connected true;

// Query if the specified compound can be reset to factory
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -canResetToFactory "CompoundName";

// Reset the specified compound to factory
vnnCompound "|bifrostLiquid1|bifrostLiquidContainer1" "liquid" -resetToFactory "CompoundName";