ag_layout module
Module ag_layout provides the definition of the functions layoutGraph(),
and layoutDoc() for automatically organizing the nodes in a graph or all graphs
in a document respectively.
- class autograph.ag_layout.NodesToKeepEnum
Bases:
objectEnumeration of what nodes to keep when laying out a graph
- class autograph.ag_layout.GUIElementsToKeepEnum
Bases:
objectEnumeration treatments of gui elements when laying out a graph
- class autograph.ag_layout.GraphFlowDirectionEnum
Bases:
objectEnumeration layout directions for graphs
- class autograph.ag_layout.GraphLayoutAlignment
Bases:
objectEnumeration what side of a graph to align when laying out a graph
- autograph.ag_layout.layoutGraph(graph, aNodeSpacing=160, aNodeShift=(80, 0), nodesToKeep=0, layoutAlignment=0, commentsToKeep=0, framesToKeep=0, navigationPinsToKeep=0)
Lays out a graph
- Parameters:
graph (
SBSDynamicValueorSBSGraphorSBSFunctionorSBSParamsGraph) – graph to layoutaNodeSpacing (int) – distance to keep between nodes when laying them out
aNodeShift (tuple of int) – Start position for the laid out graph
nodesToKeep (
NodesToKeepEnum) – What nodes to keep in the graphlayoutAlignment (
GraphLayoutAlignment) – Enum selecting whether to traverse from inputs or outputscommentsToKeep (
GUIElementsToKeepEnum) – Whether to delete or keep commentsframesToKeep (
GUIElementsToKeepEnum) – Whether to delete or keep framesnavigationPinsToKeep (
GUIElementsToKeepEnum) – Whether to delete or keep navigation pins
- Returns:
None
- autograph.ag_layout.layoutDoc(sbsDoc, aNodeSpacing=160, aNodeShift=(80, 0), nodesToKeep=0, layoutAlignment=0, commentsToKeep=0, framesToKeep=0, navigationPinsToKeep=0)
Layout all graphs in an sbs document
- Parameters:
sbsDoc – Document to layout
aNodeSpacing (int) – distance to keep between nodes when laying them out
aNodeShift (tuple of int) – Start position for the laid out graphs
nodesToKeep (
NodesToKeepEnum) – What nodes to keep in the graphlayoutAlignment (
GraphLayoutAlignment) – Enum selecting whether to traverse from inputs or outputscommentsToKeep (
GUIElementsToKeepEnum) – Whether to delete or keep commentsframesToKeep (
GUIElementsToKeepEnum) – Whether to delete or keep framesnavigationPinsToKeep (
GUIElementsToKeepEnum) – Whether to delete or keep navigation pins
- Returns:
None