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

Synopsis

vnnCompound [-addBackdrop string] [-addIONode boolean] [-addMetaData string string] [-addNode string] [-addStatePorts string string string] [-canResetToFactory string] [-clearMetaData string] [-connectTo string] [-connected boolean] [-connectedTo string] [-connectedToInput] [-connectedToOutput] [-create string] [-createInputPort string string] [-createOutputPort string string] [-deletePort string] [-explode string] [-hidePort string boolean] [-inputPort] [-listNodes] [-listPortChildren string] [-listPorts] [-moveAnnotationIn string] [-moveNodeIn string] [-movePort string int] [-movePortToIONode string string] [-nodeType string] [-outputPort] [-portFlags uint] [-portOptions string[]] [-portValues string] [-publish string string string boolean] [-publishGraph string string string string] [-queryAnnotationMetaDataValue string string] [-queryIsImported] [-queryIsReferenced] [-queryMetaData string] [-queryMetaDataAsString] [-queryMetaDatas] [-queryPortDataType string] [-queryPortDefaultValues string] [-queryPortMetaDataValue string string] [-removeAnnotation string] [-removeMetaData string string] [-removeNode string] [-renameAnnotation string string] [-renameNode string string] [-renamePort string string] [-resetPortDefaultValues string] [-resetToFactory string] [-saveAs string] [-setAnnotationMetaDataValue string string string] [-setIsReferenced boolean] [-setMetaData string string[]] [-setMetaDataFromString string] [-setPortDataType string string] [-setPortDefaultValues 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

addBackdrop, addIONode, addMetaData, addNode, addStatePorts, canResetToFactory, clearMetaData, connectTo, connected, connectedTo, connectedToInput, connectedToOutput, create, createInputPort, createOutputPort, deletePort, explode, hidePort, inputPort, listNodes, listPortChildren, listPorts, moveAnnotationIn, moveNodeIn, movePort, movePortToIONode, nodeType, outputPort, portFlags, portOptions, portValues, publish, publishGraph, queryAnnotationMetaDataValue, queryIsImported, queryIsReferenced, queryMetaData, queryMetaDataAsString, queryMetaDatas, queryPortDataType, queryPortDefaultValues, queryPortMetaDataValue, removeAnnotation, removeMetaData, removeNode, renameAnnotation, renameNode, renamePort, resetPortDefaultValues, resetToFactory, saveAs, setAnnotationMetaDataValue, setIsReferenced, setMetaData, setMetaDataFromString, setPortDataType, setPortDefaultValues, setPortMetaDataValue, specializedTypeName
Long name (short name) Argument types Properties
-addBackdrop(-ab) string createmultiuse
Add a backdrop into the compound.
-addIONode(-aio) boolean createmultiuse
Add an input or an output node into the compound.
-addMetaData(-amd) string string create
Add a value to a metatada. The arguments are, in order, metadata name, metadata value to be added.
-addNode(-an) string createmultiuse
Add a node into the compound.
-addStatePorts(-asp) string string string create
Add new input and output ports, linked together. The arguments are, in order, the input port name, the output port name and the data type to assign to both ports.
-canResetToFactory(-crf) string create
Query if the specified compound can be reset to its initial status.
-clearMetaData(-cmd) string create
Remove all the values of a metatada. The argument is the metadata name.
-connectTo(-cot) string create
Used with addNode and addIONode, use to connect - when possible, the newly created node to the given upstream node.
-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.
-hidePort(-hp) string boolean create
Hide or display an input port of a compound
-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.
-moveAnnotationIn(-mai) string createmultiuse
When creating a new compound, use this argument once for every annotation to move into the new compound
-moveNodeIn(-mi) string createmultiuse
When creating a new compound, use this argument once for every node to move into the new compound
-movePort(-mp) string int create
Move a port to the specified index in the compound
-movePortToIONode(-mpn) string string create
Move a port to another i/o node of 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.
-portFlags(-cpf) uint create
Used with "createInputPort" or "createOutputPort" to specify the flags on the port. See vnnPort command.
-portOptions(-cpo) string[] create
Used with "createInputPort" or "createOutputPort" to specify a list of options on the created port.
-portValues(-cpv) string create
Used with "createInputPort" or "createOutputPort" to specify the default value of a new port
-publish(-pub) string string string boolean create
Used to publish the compound. The arguments are, in order, the file path where to save, the namespace where to store the compound, the name to use for the nodedef, and a boolean to indicate whether the compound is overloadable or not.
-publishGraph(-pbg) string string string string create
Used to publish the compound as a graph. The arguments are, in order, the file path where to save, the namespace where to store the compound, the name to use for the nodedef, and a string containing a json property list which will contain the metadata to be associated with the graph. The json property list must be a simple set of key value pairs enclosed in curly braces.
-queryAnnotationMetaDataValue(-qam) string string create
Query the metadata value of a specified annotation. The first argument is the annotation to query, the second is the type of metadata to query.
-queryIsImported(-qii) create
Query if the compound is imported.
-queryIsReferenced(-qir) create
Query if the compound is referenced.
-queryMetaData(-qmd) string create
Query the value(s) of a metadata.
-queryMetaDataAsString(-mas) create
Gets all metadata as a string. The format is documented with the setMetaDataFromString flag
-queryMetaDatas(-qms) create
Query all the available metadatas.
-queryPortDataType(-qpt) string create
Query the data type of a specified port.
-queryPortDefaultValues(-qpv) string create
Query the default value(s) of a specified port. For ports of scalar data type (ie. float or string), this will return a single string value, For ports of structure data type (ie. vector or matrix of floats - float3/float3x3), this will return an array of string values.
-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.
-removeAnnotation(-rma) string createmultiuse
Remove the specified annotation from the compound.
-removeMetaData(-rmd) string string create
Remove a value from a metatada. The arguments are, in order, metadata name, metadata value to be removed.
-removeNode(-rmn) string createmultiuse
Remove the specified node from the compound.
-renameAnnotation(-ra) string string createmultiuse
Rename an annotation in the compound. The first argument is the old name of the annotation. The second argument is the new name.
-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.
-resetPortDefaultValues(-rpv) string create
Resets the default value(s) of a compound port The port cannot be connected. The argument is the port 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.
-setAnnotationMetaDataValue(-sam) string string string create
Set the metadata value of a specified compound annotation. The arguments are, in order, annotation name, metadata name, metadata value to be set.
-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 values to be set.
-setMetaDataFromString(-mfs) string create
Set metadata using a string. This allows creating hierarchies of metadata. The values of keys that already exist will be replaced with the new values. The format is key=values separated by semi-colons, and braces to define a sub-list of key/value pairs. Quotes are optional, but strings using spaces or separators must be quoted. Quotes and backslashes can be escaped with a backslash. Python-style single quotes are not accepted. Example of format: "house=red;car="blue and green" "house=red,blue,yellow;hat={color=yellow;height="high"};cake={flavor="choco";topping="plenty"}
-setPortDataType(-spt) string string create
Set the data type of a specified compound port.
-setPortDefaultValues(-spv) string string[] create
Set the default value(s) to a specified port The port cannot be connected. The arguments are, in order, the port name and the value(s). The value argument is an array of string that must contain the proper number of element depending of the data type of the port (ie. 3 elements for a float3 data type). For scalar data types ((ie. float or string) a single string value can be used.
-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

file -f -new;
createNewBifrostGraphCmd;
vnnCompound -create "liquid" "bifrostGraphShape1" "/";

// Create a sub-compound in the graph
vnnCompound "bifrostGraphShape1" "/liquid" -create "subCompound";

// Create an output port in the compound
vnnCompound "bifrostGraphShape1" "/liquid" -createOutputPort "newOutput" "float";

// Create an input port in the compound
vnnCompound "bifrostGraphShape1" "/liquid" -createInputPort "newInput" "float";

// Rename a port
vnnCompound "bifrostGraphShape1" "/liquid" -renamePort "newOutput" "outputValue";

// Move a port
vnnCompound "bifrostGraphShape1" "/liquid" -movePort "newInput" 0;

// Hide a port
vnnCompound "bifrostGraphShape1" "/liquid" -hidePort "newInput" 1;


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

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

// set the default value of specified port for an integer data type
vnnCompound "bifrostGraphShape1" "/liquid" -setPortDefaultValues "newInput" "18";
// set the port default values for a float3 data type
vnnCompound "bifrostGraphShape1" "/liquid" -createInputPort "newInput2" "Math::float3";
vnnCompound "bifrostGraphShape1" "/liquid" -setPortDefaultValues "newInput2" {"1.5", "1.2", "1.3"};

// Reset the port default value
vnnCompound "bifrostGraphShape1" "/liquid" -resetPortDefaultValues "newInput";
vnnCompound "bifrostGraphShape1" "/liquid" -queryPortDefaultValues "newInput";
// Result: 0 0 0 //

// query the default value of specified port for an integer data type
vnnCompound "bifrostGraphShape1" "/liquid" -queryPortDefaultValues "newInput";
// Result: 18 //
// query the default value of specified port for an float3 data type
vnnCompound "bifrostGraphShape1" "/liquid" -queryPortDefaultValues "newInput2";
// Result: 1.5 1.2 1.3 //

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

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

// query the children of a specified port
vnnCompound "bifrostGraphShape1" "/liquid" -listPortChildren "portName";

// Add a new node into VNN graph of the bifrost container
vnnCompound "bifrostGraphShape1" "/liquid" -addNode "BifrostGraph,Core::Math,add";

// Add a new node in the bifrost container and connect it to upstream 'thatNode'; thatNode -> newNode
vnnCompound "bifrostGraphShape1" "/liquid" -addNode "BifrostGraph,Core::Math,add" -connectTo "thatNode";

// Create a new input node
vnnCompound "bifrostGraphShape1" "/liquid" -addIONode true;

// Create a new output node
vnnCompound "bifrostGraphShape1" "/liquid" -addIONode false;


// Rename a node
vnnCompound "bifrostGraphShape1" "/liquid" -renameNode "add" "plus";

// Remove the node
vnnCompound "bifrostGraphShape1" "/liquid" -addNode "BifrostGraph,Core::Math,plus";
vnnCompound "bifrostGraphShape1" "/liquid" -removeNode "plus";

// Create two state ports of type float
vnnCompound "bifrostGraphShape1" "/liquid" -addStatePorts "in_name" "out_name" "float";

// Query the specialized type name
vnnCompound "bifrostGraphShape1" "/liquid" -specializedTypeName;

// Query if the compound is referenced
vnnCompound "bifrostGraphShape1" "/liquid" -queryIsReferenced;

// Query if the compound is imported
vnnCompound "bifrostGraphShape1" "/liquid" -queryIsImported;

// Make the compound private
vnnCompound "bifrostGraphShape1" "/liquid" -setIsReferenced false;

// List all child nodes in the specified compound
vnnCompound "bifrostGraphShape1" "/liquid" -listNodes;

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

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

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

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

// List nodes in the specified compound which are connected to both the parent's internal input and output port
vnnCompound "bifrostGraphShape1" "/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 "bifrostGraphShape1" "/liquid" -listNodes -connectedTo "Solid";
// Result: SetDescriptorFromObject1.value

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

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

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

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

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

// Query if the specified compound can be reset to factory
vnnCompound "bifrostGraphShape1" "/" -canResetToFactory "liquid";

// Reset the specified compound to factory
vnnCompound "bifrostGraphShape1" "/" -resetToFactory "liquid";