The following is an overview of the basic features of the hypergraph. A more detailed description is given in the user manuals. The hypergraph provides the user with the ability to view and edit the maya scene graph. The hypergraph supports two types of graphs: the DAG or scene hierarchy and the dependency graph. The default view of the hypergraph editor is the DAG view. The user can show the dependency graph for a collection of nodes by first selecting the nodes and navigating to the dependency graph using one of the graph options. The user can save any view by setting a bookmark to that view. The user can also show previous views using the view options provided. The hypergraph supports a simple editing mechanism for editing hierarchy in the DAG view and connections in dependency graph view. In the DAG view, the user can reparent or reorder nodes in the graph using drag-and-drop. In the dependency graph view, the user can select connections and delete them or make new connections by dragging and dropping nodes or existing connections. The hypergraph supports two layout modes in the DAG view: automatic and freeform. In automatic mode, the graph nodes are automatically positioned according to the layout preferences. In freeform mode, the user can position nodes manually. The node position is saved in the scene. A background image can be placed behind DG or DAG in freeform mode. This can be used as a template for positioning nodes in a user-defined layout. Nodes in the DAG view can be expanded or collapsed. The state is saved in the scene. The performance of the graph drawing will increase as hierarchies are collapsed. In addition to hierachy relationships, the hypergraph can show expression, constraint and deformation relationships in the DAG. These can be enabled/disabled through the options provided. There are also additional filters for showing shape nodes and invisible nodes. The amount of detail show may affect the speed of the display of the graph. Most of the UI features of the hypergraph are addressable through the hypergraph command-line interface. The available command-line options are described in the next section.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
addBookmark (abk) | bool | ||
|
|||
addDependGraph (adg) | PyNode | ||
|
|||
addDependNode (adn) | PyNode | ||
|
|||
animateTransition (atr) | bool | ||
|
|||
attributeEditor (ae) | unicode | ||
|
|||
backward (bak) | bool | ||
bookmarkName (bn) | bool | ||
|
|||
breakConnectionCommand (bco) | unicode | ||
clear (clr) | bool | ||
|
|||
collapseContainer (cc) | bool | ||
|
|||
connectionDrawStyle (cds) | unicode | ||
Specify how connections between nodes should be drawn. Valid values are center(draws connection lines from the center of one node to the center of the other) and side(draws connection lines from the right side of the source node to the left side of the destination node). The default is center. This flag does not apply to Hypershade graphs, which are always drawn with the sideconnection draw style. |
|||
control (ctl) | bool | ||
Query only. Returns the top level control for this editor. Usually used for getting a parent to attach popup menus. Caution: It is possible, at times, for an editor to exist without a control. This flag returns NONEif no control is present. |
|||
currentEdge (ced) | unicode | ||
currentNode (cno) | unicode | ||
debug (deb) | unicode | ||
defineTemplate (dt) | unicode | ||
Puts a command in a mode where any other flags and args are parsed and added to the command template specified in the argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set as the current template. |
|||
deleteBookmark (dbk) | unicode | ||
|
|||
dependGraph (dg) | bool | ||
|
|||
dependNode (dn) | unicode | ||
|
|||
directoryPressCommand (dp) | unicode | ||
docTag (dtg) | unicode | ||
|
|||
down (do) | bool | ||
|
|||
downstream (ds) | bool | ||
|
|||
dragAndDropBehaviorCommand (ddc) | unicode | ||
Mel proc called when a drag and drop onto a hyperGraph node has occurred. Proc signature is procName (string $editor, string $sourceNode, string $destinationNode). |
|||
dropNode (dr) | unicode | ||
|
|||
dropTargetNode (drt) | unicode | ||
|
|||
edgeDblClickCommand (edc) | unicode | ||
|
|||
edgeDimmedDblClickCommand (edd) | unicode | ||
|
|||
edgeDropCommand (edr) | unicode | ||
edgePressCommand (ep) | unicode | ||
edgeReleaseCommand (er) | unicode | ||
enableAutomaticLayout (eal) | bool | ||
|
|||
exists (ex) | bool | ||
|
|||
expandContainer (ec) | bool | ||
|
|||
feedbackGadget (fbg) | unicode | ||
|
|||
feedbackNode (fbn) | unicode | ||
|
|||
filter (f) | unicode | ||
|
|||
filterDetail (fd) | unicode, bool | ||
|
|||
fitImageToHeight (fih) | bool | ||
|
|||
fitImageToWidth (fiw) | bool | ||
|
|||
focusCommand (fc) | unicode | ||
|
|||
fold (fo) | bool | ||
|
|||
forceMainConnection (fmc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. This is a variant of the -mainListConnection flag in that it will force a change even when the connection is locked. This flag is used to reduce the overhead when using the -unlockMainConnection , -mainListConnection, -lockMainConnection flags in immediate succession. |
|||
forceRefresh (frf) | bool | ||
|
|||
forward (fow) | bool | ||
frame (fr) | bool | ||
|
|||
frameBranch (frb) | bool | ||
|
|||
frameGraph (fg) | bool | ||
|
|||
frameGraphNoRebuild (fgn) | bool | ||
frameHierarchy (frh) | bool | ||
|
|||
freeform (fre) | bool | ||
|
|||
fromAttr (fat) | unicode | ||
|
|||
fromNode (frn) | unicode | ||
getNodeList (gnl) | bool | ||
|
|||
getNodePosition (gnp) | unicode | ||
Returns the position of a specified node in x,y graph coords. This flag and its argument must be passed to the command before the -q flag (see examples). In query mode, this flag can accept a value. |
|||
graphDescription (gd) | bool | ||
graphLayoutStyle (gls) | unicode | ||
|
|||
graphType (gt) | unicode | ||
|
|||
heatMapDisplay (hmd) | bool | ||
highlightConnection (hlc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will synchronize with its highlight list. Not all editors have a highlight list. For those that do, it is a secondary selection list. |
|||
iconSize (ics) | unicode | ||
|
|||
image (img) | unicode | ||
|
|||
imageEnabled (ime) | bool | ||
|
|||
imageForContainer (ifc) | bool | ||
|
|||
imagePosition (imp) | float, float | ||
|
|||
imageScale (ims) | float | ||
|
|||
initializeScript (ini) | unicode | ||
isHotkeyTarget (iht) | bool | ||
|
|||
layout (lay) | bool | ||
|
|||
layoutSelected (lsl) | unicode | ||
|
|||
layoutSubtree (lsb) | bool | ||
limitGraphTraversal (lgt) | int | ||
lockMainConnection (lck) | bool | ||
Locks the current list of objects within the mainConnection, so that only those objects are displayed within the editor. Further changes to the original mainConnection are ignored. |
|||
look (loo) | float, float | ||
|
|||
mainListConnection (mlc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. |
|||
mergeConnections (mc) | bool | ||
|
|||
navigateHome (hom) | bool | ||
|
|||
navup (nu) | bool | ||
newInputConnection (nin) | unicode | ||
newOutputConnection (nou) | unicode | ||
nextView (nvw) | bool | ||
|
|||
nodeConnectCommand (nco) | unicode | ||
nodeDblClickCommand (ndc) | unicode | ||
nodeDropCommand (ndr) | unicode | ||
|
|||
nodeMenuCommand (nm) | unicode | ||
nodePressCommand (np) | unicode | ||
|
|||
nodeReleaseCommand (nr) | unicode | ||
|
|||
opaqueContainers (opc) | bool | ||
|
|||
orientation (orientation) | unicode | ||
|
|||
panView (pan) | float, float | ||
panel (pnl) | unicode | ||
Specifies the panel that the editor belongs to. By default if an editor is created in the create callback of a scripted panel it will belong to that panel. If an editor doesn’t belong to a panel it will be deleted when the window that it is in is deleted. |
|||
parent (p) | unicode | ||
|
|||
popupMenuScript (pms) | unicode | ||
Set the script to be called to register the popup menu with the control for this hypergraph. The script will be called with a string argument which gives the name of the hypergraph whose control the popup menu should be parented to. |
|||
previousView (pvw) | bool | ||
|
|||
range (rg) | float, float | ||
Limits the display of nodes to only those within the range. There are two float values expected, the first the lower threshold of the range and the second the upper threshold of the range. The values are absolute timing values, not percentages. |
|||
rebuild (rb) | bool | ||
|
|||
removeNode (rmn) | unicode | ||
|
|||
rename (rn) | bool | ||
|
|||
resetFreeform (rf) | bool | ||
|
|||
restoreBookmark (rbk) | unicode | ||
|
|||
scrollUpDownNoZoom (snz) | bool | ||
|
|||
selectionConnection (slc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will synchronize with its own selection list. As the user selects things in this editor, they will be selected in the selectionConnection object. If the object undergoes changes, the editor updates to show the change. |
|||
setNodePosition (snp) | unicode, float, float | ||
Sets the node identified by string to the (x,y) position in the window specified by the two floats. If the node is not in the graph than it will be added to the graph and then moved to the new position. |
|||
showCachedConnections (scc) | bool | ||
showConstraints (shc) | bool | ||
|
|||
showDeformers (shd) | bool | ||
|
|||
showExpressions (shx) | bool | ||
|
|||
showInvisible (shi) | bool | ||
|
|||
showRelationships (shr) | bool | ||
|
|||
showShapes (shs) | bool | ||
|
|||
showUnderworld (shu) | bool | ||
|
|||
stateString (sts) | bool | ||
Query only flag. Returns the MEL command that will edit an editor to match the current editor state. The returned command string uses the string variable $editorName in place of a specific name. |
|||
toAttr (tat) | unicode | ||
toNode (ton) | unicode | ||
transitionFrames (tfr) | int | ||
|
|||
unParent (up) | bool | ||
|
|||
unfold (uf) | bool | ||
|
|||
unfoldAll (ua) | bool | ||
|
|||
unfoldAllShapes (uas) | bool | ||
unfoldHidden (ufh) | bool | ||
unlockMainConnection (ulk) | bool | ||
|
|||
updateMainConnection (upd) | bool | ||
|
|||
updateNodeAdded (una) | bool | ||
|
|||
updateSelection (us) | bool | ||
|
|||
upstream (ups) | bool | ||
|
|||
useDrawOverrideColor (drc) | bool | ||
useFeedbackList (ufl) | bool | ||
|
|||
useTemplate (ut) | unicode | ||
|
|||
viewOption (vo) | unicode | ||
|
|||
visibility (vis) | bool | ||
|
|||
zoom (zm) | float | ||
|
Derived from mel command maya.cmds.hyperGraph
Example:
import pymel.core as pm
# The hyperGraph command is not one which would commonly be used
# by the user.
pm.polySphere( r=1, sx=20, sy=20, ax=(0, 1, 0), tx=2, ch=1 )
# Result: [nt.Transform(u'pSphere1'), nt.PolySphere(u'polySphere1')] #
# Gets the position of the node in the graph.
maya.mel.eval( "HypergraphHierarchyWindow" )
position = pm.hyperGraph( 'hyperGraphPanel1HyperGraphEd', query=True, getNodePosition='pSphere1' )
print position