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

Synopsis

vnnCompoundEditor [-annSelection] [-currentCompound string] [-dgContainer] [-edit string] [-listEditors] [-name string] [-nodeSelection string] [-reload] [-runtimeHint string] [-selectNodes string] [-sendKey int int] [-title string]

vnnCompoundEditor is NOT undoable, queryable, and NOT editable.

Opens, queries, and updates the Compound Editor

Return value

None

In query mode, return type is based on queried flag.

Flags

annSelection, currentCompound, dgContainer, edit, listEditors, name, nodeSelection, reload, runtimeHint, selectNodes, sendKey, title
Long name (short name) Argument types Properties
-annSelection(-an) query
Gets the selected annotations, if any, in the form of a string array.
-currentCompound(-cc) string createquery
Get or sets the current compound. When setting, the new path must be in the same hierarchy as the current compound. Use Edit to edit a new graph.
-dgContainer(-dg) query
Returns the name of the currently edited DG container in the form of a Maya path, or an empty string if the editor is empty.
-edit(-ed) string create
Edits the given graph. The string is the name of a maya DG container from the outliner, for example "BifrostGraph1"
-listEditors(-ls) createquery
Returns the list of compound editor controls that exist in the Maya workspace, if any, as a string array. The names can be used with the -name parameter to query a specific editor.
-name(-nm) string create
Sets the name of the Maya workspace control that wraps the window. This can be used to create more than one compound editor in a single Maya workspace and to specify the correct window in edit and query mode. If not specified on creation, the workspaceControl will be named "vnnCompoundEditorControl". If not specified in query or edit mode, it will default to the first control name found in the workspace. Bifrost uses the name "bifrostGraphEditorControl". -listEditors can be used to print the list of the known controls.
-nodeSelection(-ns) string create
Gets or sets the node selection. When setting, the string is a node name or path, or a list of nodes in the format "{node1,node2}". The nodes must be direct children of the currently edited compound. When getting, a string array of the node names is returned. See -currentCompound to get the parent path. It's possible to specify -dgContainer, -currentCompound and -nodeSelection to get the container, parent compound, and selected nodes in one call.
-reload(-rl) create
Set when "reloading" the window from a Maya workspace and should not be set at other times
-runtimeHint(-rt) string create
Specifies a vnn runtime name when opening an empty compound editor so that the editor can show that runtime's default menus and customization.
-selectNodes(-sn) string create
Obsolete: Selects the specified nodes. The nodes must be in the current compound. see -ns/-nodeSelection instead.
-sendKey(-sk) int int create
Used to send a simulated key press and release to the graph view. First parameter: lower cap ASCII key, for example 65 for 'a', or one numeric value of Qt::Key Second parameter: 0 or bitwise combination of modifiers of Qt::KeyboardModifiers. For example. shift is 0x02000000 or 33554432 in decimal
-title(-tl) string create
Sets the title of the window on creation. Modify the title again later with the standard workspaceControl command.

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

// changing the current compound in the compound editor
file -f -new;
string $bifrostShape= `createNode bifrostGraphShape`;
vnnCompound -create "MyCompound" $bifrostShape "/";
vnnCompoundEditor -edit $bifrostShape -name bifrostGraphEditorControl;

// we don't need to set the name of the editor on query because we only have one
print ("Current Compound is " + `vnnCompoundEditor  -q -currentCompound` + "\n");

// the next line can be interpreted as a create or edit, so we need to specify the name
vnnCompoundEditor  -currentCompound "/MyCompound" -name bifrostGraphEditorControl;
print ("New Current Compound is " + `vnnCompoundEditor  -q -currentCompound` + "\n");

// we need to process Qt messages to update the compound editor before we can set the selection
refresh -force;
vnnCompoundEditor -nodeSelection "input" -name bifrostGraphEditorControl;

string $sel[] = `vnnCompoundEditor -q -dgContainer -currentCompound -nodeSelection`;
print ("new selection is:\n");
print ($sel);

// sends the key "A" to the editor, to frame all
vnnCompoundEditor -sendKey 65 0 -name bifrostGraphEditorControl;