The SchematicView MixinInterface is returned by the getView() method and the .current property in the SchematicViews Interface and provides access to properties and methods of a specific existing Schematic View.
Interface: SchematicView
Example:
SchematicViews.open "My Schematic View"
True
sv = schematicviews.current
<MixinInterface:SchematicView>
sv.syncSelection
True
sv.syncSelection = False
False
Properties:
.syncSelection : bool : Read|Write
Get/Set the Sync. Selection option state.
.alwaysArrange : bool : Read|Write
Get/Set the state of the Always Arrange option switch.
.showGrid : bool : Read|Write
Get/Set the visibility of the Grid.
.gridSnap : bool : Read|Write
Get/Set the state of the Grid Snap option.
.gridSpacing : integer : Read|Write
Get/Set the spacing of the Grid.
.showBackgroundImage : bool : Read|Write
Enable/Disable the display of the background image.
.backgroundImageLock : bool : Read|Write
Lock/Unlock the background image.
.syncSelectionType : enum : Read|Write
syncSelectionType enums: {#viewports|#everything}
Get/Set the Sync Selection Type.
.arrangeMethod : enum : Read|Write
arrangeMethod enums: {#stacked|#horiz|#vert}
Get/Set the Arrange Method Type.
.linkStyle : enum : Read|Write
linkStyle enums: {#bezier|#straight|#circuit|#none}
Get/Set the Link Style.
.moveChildren : bool : Read|Write
Get/Set whether children are moved with the parent..
.doubleBuffer : bool : Read|Write
Controls the state of "Double Buffer " checkbox in the the "Schematic View Preferences" dialog. When set to true (default), double-buffer technique will be used to redraw the Schematic View. When set to false, the display will flicker noticeably.
.panToNodes : bool : Read|Write
Controls the state of "Pan to Added Node " checkbox in the the "Schematic View Preferences" dialog.
.useWireframeColor : bool : Read|Write
Controls the state of the "Use Wireframe Color" checkbox in the "Schematic View Preferences" dialog. When set to True, the wireframe color will be used to display the node in Schematic View.
.zoomMousePoint : bool : Read|Write
Controls the state of "Zoom About Mouse" checkbox in the "Schematic View Preferences" dialog. When set to true, the zoom is performed with the mouse point as center.
.layoutWarning : bool : Read|Write
Controls the state of the "Display Layout Warning" checkbox in the "Schematic View Preferences" dialog.
.updateOnFocus : bool : Read|Write
Controls the state of the "Only Updates on Focus" checkbox in the "Schematic View Preferences" dialog.
.showTooltips : bool : Read|Write
Controls the state of "Show Tooltips" checkbox in the "Schematic View Preferences" dialog.
.snapFloaters : bool : Read|Write
Controls the state of "Snap Floaters" checkbox in the "Schematic View Preferences" dialog.
.relativeFloaters : bool : Read|Write
Controls the state of "Relative Floaters" checkbox in the "Schematic View Preferences" dialog.
.showShrink : bool : Read|Write
Get/Set the Shrink mode. This value is also being controlled by the Layout > Toggle Shrink option in the Schematic View menu.
Methods:
<string>getName()
Returns the name of the Schematic View.
<void>setName <string>name
Sets the name of the Schematic View to the specified string.
<integer>beginEdit()
Begins edit, increases the internal edit counter by one and returns it as integer. This prevents Schematic View from traversing the scene and generating new Schematic View Nodes. This guarantees that locally stored Schematic View Node IDs remain valid.
<integer>endEdit()
Ends edit, decreases the internal edit counter by one and returns it as integer. Failure to call endEdit() after the corresponding beginEdit() will prevent Schematic View from updating based on scene changes.
<void>updateView <bool>fullTraverse
Updates the Schematic View. When the parameter is set to true, the node hierarchy will be fully traversed.
<integer>getSVNodeID <fpvalue>anim
Returns the Schematic View Node ID for the supplied sub-anim.
For Example:
resetMaxFile #noPrompt --reset the max scene
OK
teapot() --create a new teapot
$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]
SchematicViews.open "Pots" --open a new Schematic View
True --yes, it worked!
--Get the ID of the Teapot node
SchematicViews.current.getSVNodeID $Teapot01
0 --it is ID 0
--Get the ID of the Visibility track of the Teapot node
SchematicViews.current.getSVNodeID $Teapot01[1]
-1 --no such SV node, returns -1
--Now get the ID of the Transformation track of the Teapot
SchematicViews.current.getSVNodeID $Teapot01[3]
1 --it is ID 1
--Get the ID of the Position track of the Teapot
SchematicViews.current.getSVNodeID $Teapot01[3][1]
2 --it is ID 1
--Get the ID of the Object track of the Teapot
SchematicViews.current.getSVNodeID $Teapot01[4]
11 --it is ID 1
<int by value array>getSVNodeIDTab <fpvalue>anim
Returns the Schematic View Node ID Tab as an array of integers. If anim is an instanced object, the array of Schematic View Node IDs corresponds to the Node IDs for that instanced object.
<maxObject>getSVNodeAnim <integer>svNodeID
Returns the sub-anim object corresponding to the specified Schematic View Node ID
For Example:
resetMaxFile #noPrompt --reset the max scene
OK
teapot() --create a new teapot
$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]
SchematicViews.open "Pots" --open a new Schematic View
True --yes, it worked!
--Get the object node of the Teapot by ID (see example above)
SchematicViews.current.getSVNodeAnim 0
$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]
--Now get the sub-anim of the Transformation track of the Teapot
SchematicViews.current.getSVNodeAnim 1
Controller:Position_Rotation_Scale
--Get the sub-anim of the Position track of the Teapot
SchematicViews.current.getSVNodeAnim 2
Controller:Position_XYZ
--Get the sub-anim of the Object track of the Teapot
SchematicViews.current.getSVNodeAnim 11
Teapot
<string>getSVNodeName <integer>svNodeID
Returns the Schematic View Node Name by ID
For Example:
resetMaxFile #noPrompt
OK
teapot()
$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]
SchematicViews.open "Pots"
True
SchematicViews.current.getSVNodeName 0
"Teapot01"
SchematicViews.current.getSVNodeName 1
"Position/Rotation/Scale (Transform)"
SchematicViews.current.getSVNodeName 2
"Position XYZ (Position)"
SchematicViews.current.getSVNodeName 11
"Teapot (Object)"
<integer>getNumSVNodes()
Returns the number of Schematic View nodes as integer.
<bool>selectSVNode <integer>svNodeID [selectChildren:<bool>]
selectChildren default value: false
Selects the node by ID. If the optional selectChildren is set to true, also selects the children of the node. Returns true on success, false otherwise.
<bool>deselectSVNode <integer>svNodeID [selectChildren:<bool>]
selectChildren default value: false
Deselects the node by ID. If the optional selectChildren is set to true, also deselects the children of the node. Returns true on success, false otherwise.
<void>selectAll()
Selects all nodes in the Schematic View.
<void>deselectAll()
Deselects all nodes in the Schematic View.
<void>selectInvert()
Inverts the current selection in the Schematic View.
<bool>selectChildren [svNodeID:<integer>]
svNodeID default value: -1
Selects the children of all selected nodes. If the optional svNodeId is supplied and is not -1, only children of the specified node will be selected. Returns true on success, false otherwise.
<bool>deselectChildren svNodeID:<integer>
svNodeID default value: -1
Deselects the children of all selected nodes. If the optional svNodeId is supplied and is not -1, only children of the specified node will be deselected. The parent itself will not be deselected. Returns true on success, false otherwise.
<void>selectToScene()
Synchronizes the Schematic View selection to the Scene - Selects the scene nodes that are selected in Schematic View.
<void>selectFromScene()
Synchronizes the Schematic View selection from the Scene - Selects the Schematic View nodes that are selected in the scene.
<int by value array>getSelectedSVNodes()
Returns an array of svNodeID integers - one for every selected node.
<bool>isSelected <integer>svNodeID
Returns true if the node specified by ID is selected, false otherwise.
<integer>numChildren <integer>svNodeID
Returns the number of children nodes of the node specified by ID
<integer>getChildSVNodeID <integer>svNodeID <integer>childNum
Returns the svNodeID of the Nth child of the node specified by ID
<integer>numParents [svNodeID:<integer>]
svNodeID default value: -1
Returns the number of parents. If the optional svNodeID is specified as in not -1, the number of parent nodes of the node specified by ID will be returned.
<integer>getParentSVNodeID <integer>svNodeID <integer>parentNum
Returns the Nth parent's svNodeID of the child specified by ID.
<integer>getFocus()
Returns the svNodeID of the node that is in focus.
<bool>hide svNodeID:<integer>
svNodeID default value: -1
Hides all selected nodes and their children. If the optional svNodeID is supplied and is not -1, only the specified node and its children will be hidden.
<bool>unHide <integer>svNodeID
Unhides the node specified by ID. Returns true on success, false otherwise.
<bool>collapseSVNodes [svNodeID:<integer>]
svNodeID default value: -1
Collapses all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.
<void>hideAll()
Hides all Schematic View nodes.
<void>showAll()
Unhides all Schematic View nodes.
<bool>expandSVNodes [svNodeID:<integer>]
svNodeID default value: -1
Expands all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.
<bool>shrink [svNodeID:<integer>]
svNodeID default value: -1
Shrinks all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.
<bool>unShrink [svNodeID:<integer>]
svNodeID default value: -1
Unshrinks all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.
<void>unShrinkAll()
Expands all Schematic View nodes.
<bool>arrangeSVNode [svNodeID:<integer>]
svNodeID default value: -1
Arranges all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.
<bool>arrangeChildren [svNodeID:<integer>]
svNodeID default value: -1
Arranges the children of all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.
<bool>freeSVNode [svNodeID:<integer>]
svNodeID default value: -1
Frees all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.
<void>freeAll()
Frees all Schematic View nodes.
<void>zoomExtents()
Zooms the Schematic View to fit all nodes.
<void>zoomSelectedExtents()
Zoom the Schematic View to fit the selected nodes.
<void>panToSelected()
Pans the Schematic View to the Selected Nodes without changing the Zoom factor.
<bool>zoomToSVNode <integer>svNodeID
Zooms the Schematic View to show the Schematic View Node specified by ID. Returns True on success.
<bool>panToSVNode <integer>svNodeID
Pans the Schematic View to show the Schematic View Node specified by ID. Returns True on success.
<filename>getBackgroundImageName()
Returns the background image name as filename.
<void>setBackgroundImageName <filename>name
Sets the background image name to the specified filename.
<void>addBookmark <string>name
Creates a new bookmark with the given name, storing the current state of the Schematic View.
<void>nextBookmark()
Goes to the next Bookmark.
<void>prevBookmark()
Goes to the previous Bookmark.
<bool>setSVNodePos <integer>svNodeID <bool>children <point2 by value>point
Sets the position of the Schematic View Node specified by ID to the supplied Point2 value. If the children parameter is set to True, the Children of the specified node will be repositioned, too. Returns True on success.
<point2 by value>getSVNodePos <integer>svNodeID
Returns the position of the Schematic View Node specified by ID as a Point2 value.
<bool>translateSVNode <integer>svNodeID <bool>children <point2 by value>point
Translates the Schematic View Node specified by ID by the supplied Point2 value. If the children parameter is set to True, the Children of the specified node will be repositioned, too. Returns True on success.
<bool>translateSelected <point2 by value>point
Translates the selected Schematic View Nodes by the supplied Point2 value.
<bool>canAssignController svNodeID:<integer>
svNodeID default value: -1
Returns True if a controller can be assigned to the Schematic View Node specified by ID.
<bool>showAssignControllerDialog svNodeID:<integer>
svNodeID default value: -1
Opens the Assign Controller Dialog for the Schematic View Node specified by ID. Returns True on success.
<bool>deleteSelected()
Deletes the selected Schematic View Nodes. Returns True on success.
<bool>showProperties [svNodeID:<integer>]
svNodeID default value: -1
Opens the Properties dialog for the Schematic View Node specified by ID. Returns True on success.
<float>getSVNodeWidth()
Returns the width of the Schematic View nodes.
<float>getSVNodeHeight()
Returns the height of the Schematic View nodes.
<bool>testSVNodeState <integer>svNodeID <enum>state
state enums: {#selected|#visible|#displayed|#inode|#localRoot|#animated|#instanced|#shrink|#freeMove|#freeMoveParent|#inactive}
Returns true if the node supplied by ID is in the specified state. #inactive tests for frozen or hidden nodes, #localRoot tests if the Schematic View Node is the root of a hierarchy (ie, no parents), #inode tests if the Schematic View Node is a Node object.
<maxObject>getSVNodeOwner <integer>svNodeID
Returns the scene object owning the Schematic View node supplied by ID
<integer>getSVNodeAnimID <integer>svNodeID
Returns the sub-anim ID of the Schematic View node supplied by ID
<void>doubleClickSVNode <integer>svNodeID
Performs a double-clik over the Schematic View node supplied by ID
<integer>getNumOutputRelationships <integer>svNodeID
Returns the number of output relationships of the Schematic View node supplied by ID
<enum>getOutputRelationshipType <integer>svNodeID <integer>relIndex
getOutputRelationshipType enums: {#unknown|#paramwire|#constraint|#light|#modifier|#controller)
Returns the type of the specified output relationship of the Schematic View node supplied by ID.
<integer>getOutputRelationshipSVNodeID <integer>svNodeID <integer>relIndex
Returns the Schematic View node ID of the specified output relationship of the Schematic View node supplied by ID.
<integer>getNumInputRelationships <integer>svNodeID
Returns the number of input relationships of the Schematic View node supplied by ID
<enum>getInputRelationshipType <integer>svNodeID <integer>relIndex
getInputRelationshipType enums: {#unknown|#paramwire|#constraint|#light|#modifier|#controller)
Returns the type of the specified intput relationship of the Schematic View node supplied by ID.
<integer>getInputRelationshipSVNodeID <integer>svNodeID <integer>relIndex
Returns the Schematic View node ID of the specified intput relationship of the Schematic View node supplied by ID.
<bool>canMakeSVNodeUnique <integer>svNodeID
Returns true if the Schematic View node supplied by ID can be made unique.
<bool>makeSVNodeUnique <integer>svNodeID
Makes the Schematic View node supplied by ID unique, returns true on success.
<bool>setShowRelationships <integer>svNodeID <bool>show
Controls the relationships display for the Schematic View node supplied by ID.
<bool>getShowRelationships <integer>svNodeID
Returns true if the relationships display for the Schematic View node supplied by ID is enabled, false otherwise.
<void>showPreferencesDialog()
Opens the Preferences dialog.
<void>showDisplayFloater <bool>show
Opens/closes the Preferences dialog. When the supplied parameter is true, the dialog will be opened, when false, it will be closed.
<void>showRelationshipDialog <bool>all
Opens the Relationships dialog. When the supplied parameter is true, all relationships will be shown.
<void>showInstancesDialog <bool>all
Opens the Instances dialog. When the supplied parameter is true, all instances will be shown.
<void>showObjectOccurrenceDialog()
Opens the Object Occurence dialog.
<void>showListViewDialog <&integer array>svNodes [title:<string>] [id:<integer>]
svNodes is In and Out parameter
title default value: undefined
id default value: 1
Opens the ListView dialog displaying the nodes specified by an array of ID passed by reference. The ID parameter is useful for enabling menu items specific to your custom List View content.
<void>hideListViewDialog()
Closes the ListView dialog.
<int by value array>getSelectedListViewSVNodes()
Returns the nodes currently selected in the ListView dialog.
<enum>getListViewDialogType()
getListViewDialogType enums: {#unknown|#relationship|#instance|#occurrence|#userDefined)
Returns the current type of the ListView dialog. #userDefined is returned for List Views created with the showListViewDialog method.
<integer>getListViewDialogID()
Returns the ID of the ListView dialog as integer.
<string>getListViewDialogTitle()
Returns the title of the ListView dialog as string.
<bool>setMode <enum>mode
mode enums: {#select|#connect|#paramwire|#pan|#zoom|#zoomregion}
Sets the current Schematic View mode. Returns True on success, False otherwise..
<enum>getMode()
getMode enums: {#select|#connect|#paramwire|#pan|#zoom|#zoomregion)
Returns the current Schematic View mode.
<bool>setLayoutMode <enum>mode
mode enums: {#reference|#hierarchy}
Sets the current Schematic View layout.
<enum>getLayoutMode()
getLayoutMode enums: {#reference|#hierarchy)
Returns the current Schematic View layout.
<bool>setDisplayFloaterFilter <enum>filter
filter enums: {#expand|#focus|#baseObjects|#modifierStack|#materials|#controllers|#controllersPos|#controllersRot|#controllersScale|#relConstraints|#relControllers|#relParamWires|#relLights|#relModifiers}
Sets the specified Display Floater Filter. Returns True on success, False otherwise.
<bool>clearDisplayFloaterFilter <enum>filter
filter enums: {#expand|#focus|#baseObjects|#modifierStack|#materials|#controllers|#controllersPos|#controllersRot|#controllersScale|#relConstraints|#relControllers|#relParamWires|#relLights|#relModifiers}
Clears the specified Display Floater Filter. Returns True on success, False otherwise.
<bool>testDisplayFloaterFilter <enum>filter
filter enums: {#expand|#focus|#baseObjects|#modifierStack|#materials|#controllers|#controllersPos|#controllersRot|#controllersScale|#relConstraints|#relControllers|#relParamWires|#relLights|#relModifiers}
Tests the state of the specified Display Floater Filter. Returns True if the Filter is set, False otherwise.
<bool>setIncludeFilter <enum>filter
filter enums: {#baseObjects|#modifierStack|#materials|#controllers|#staticValues|#masterPoint|#skinDetails|#selectedOnly|#visibleOnly|#animatedOnly|#geometryHide|#shapesHide|#lightsHide|#cameraHide|#helpersHide|#spacewarpsHide|#bonesHide}
Sets the specified Display Floater Include Filter. Returns True on success, False otherwise.
<bool>clearIncludeFilter <enum>filter
filter enums: {#baseObjects|#modifierStack|#materials|#controllers|#staticValues|#masterPoint|#skinDetails|#selectedOnly|#visibleOnly|#animatedOnly|#geometryHide|#shapesHide|#lightsHide|#cameraHide|#helpersHide|#spacewarpsHide|#bonesHide}
Clears the specified Display Floater Include Filter. Returns True on success, False otherwise.
<bool>testIncludeFilter <enum>filter
filter enums: {#baseObjects|#modifierStack|#materials|#controllers|#staticValues|#masterPoint|#skinDetails|#selectedOnly|#visibleOnly|#animatedOnly|#geometryHide|#shapesHide|#lightsHide|#cameraHide|#helpersHide|#spacewarpsHide|#bonesHide}
Tests the state of the specified Display Floater Include Filter. Returns True if the Include Filter is set, False otherwise.
<integer>getBaseSVNodeID <integer>
Returns the SVNodeID of the base SVNode (the INode)
<integer>getRootSVNodeID <integer>
Returns the SVNodeID of the local root for the SVNode
<Point2>screenToSV <Point2>
Converts a screen coordinate into schematic view coordinates
<Array of Integers>getSVNodeIDByPoint <Point2>
Will return an array of the graphnodes under the sv coordinate passed in as Point2
See also