Go to: Synopsis. Return value. Flags. Python examples.
vnnCompoundEditor([annSelection=boolean], [currentCompound=string], [dgContainer=boolean], [edit=string], [listEditors=boolean], [name=string], [nodeSelection=string], [reload=boolean], [runtimeHint=string], [selectNodes=string], [sendKey=[int, int]], [title=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
vnnCompoundEditor is NOT undoable, queryable, and NOT editable.
Opens, queries, and updates the Compound Editor
None
In query mode, return type is based on queried flag.
annSelection, currentCompound, dgContainer, edit, listEditors, name, nodeSelection, reload, runtimeHint, selectNodes, sendKey, title
| Long name (short name) |
Argument types |
Properties |
|
annSelection(an)
|
boolean
|
|
|
Gets the selected annotations, if any, in the form of a string array.
|
|
currentCompound(cc)
|
string
|

|
|
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)
|
boolean
|
|
|
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
|
|
|
Edits the given graph. The string is the name of a maya DG container from the outliner, for example "BifrostGraph1"
|
|
listEditors(ls)
|
boolean
|

|
|
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
|
|
|
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
|
|
|
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)
|
boolean
|
|
|
Set when "reloading" the window from a Maya workspace and should not be set at other times
|
|
runtimeHint(rt)
|
string
|
|
|
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
|
|
|
Obsolete: Selects the specified nodes. The nodes must be in the current compound. see -ns/-nodeSelection instead.
|
|
sendKey(sk)
|
[int, int]
|
|
|
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
|
|
|
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 have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
# changing the current compound in the compound editor
cmds.file(new=1, f=1)
bifrostShape = cmds.createNode('bifrostGraphShape')
cmds.vnnCompound( bifrostShape, '/', create='MyCompound' )
cmds.vnnCompoundEditor( name='bifrostGraphEditorControl', edit=bifrostShape )
# we don't need to set the name of the editor on query because we only have one
print('Current Compound is ' + cmds.vnnCompoundEditor(q=1, currentCompound=1, name='bifrostGraphEditorControl'))
# the next line can be interpreted as a create or edit, so we need to specify the name
cmds.vnnCompoundEditor( currentCompound='/MyCompound', name='bifrostGraphEditorControl' )
print('New Current Compound is ' + cmds.vnnCompoundEditor(q=1, currentCompound=1, name='bifrostGraphEditorControl'))
# we need to process Qt messages to update the compound editor before we can set the selection
cmds.refresh(force=True)
cmds.vnnCompoundEditor(nodeSelection="input",name="bifrostGraphEditorControl")
selection = cmds.vnnCompoundEditor(query=True, dgContainer=True, currentCompound=True, nodeSelection=True);
print ('new selection is:' + str(selection))
# sends the key "A" to the editor, to frame all
cmds.vnnCompoundEditor(sendKey=(ord('A'), 0), name='bifrostGraphEditorControl')