Go to: Synopsis. Return value. Keywords. Flags. Python examples.

Synopsis

visor([addFolder=boolean], [addNodes=string], [allowPanningInX=boolean], [allowPanningInY=boolean], [allowZooming=boolean], [command=string], [deleteFolder=string], [editFolder=string], [folderList=string], [menu=string], [name=string], [nodeType=string], [openDirectories=boolean], [openFolder=boolean], [parent=string], [path=string], [popupMenuScript=string], [rebuild=boolean], [refreshAllSwatches=boolean], [refreshSelectedSwatches=boolean], [refreshSwatch=string], [reset=boolean], [restrictPanAndZoom=boolean], [saveSwatches=boolean], [scrollBar=string], [scrollPercent=float], [selectedGadgets=string], [showDividers=boolean], [showFiles=boolean], [showFolders=boolean], [showNodes=boolean], [stateString=boolean], [style=string], [transform=string], [type=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

visor is undoable, queryable, and NOT editable.

Command for the creation and manipulation of a Visor UI element. The Visor is used to display the contents of a scene (rendering related nodes in particular), as well as files on disk which the user may wish to bring into the scene (shader and texture libraries for example).

Return value

string

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

Keywords

render, hypergraph, shader, hypershade

Flags

addFolder, addNodes, allowPanningInX, allowPanningInY, allowZooming, command, deleteFolder, editFolder, folderList, menu, name, nodeType, openDirectories, openFolder, parent, path, popupMenuScript, rebuild, refreshAllSwatches, refreshSelectedSwatches, refreshSwatch, reset, restrictPanAndZoom, saveSwatches, scrollBar, scrollPercent, selectedGadgets, showDividers, showFiles, showFolders, showNodes, stateString, style, transform, type
Long name (short name) Argument types Properties
addFolder(add) boolean createquery
Add a new folder to the current visual browser
addNodes(adn) string createquery
Add dependency graph nodes by name to a user defined custom folder. The argument is a string encolsed in quotes with 1 one more node names seperated by blanks
allowPanningInX(apx) boolean createquery
Specifies whether or not the user should be able to pan the contents of the visor horizontally. Default is true.
allowPanningInY(apy) boolean createquery
Specifies whether or not the user should be able to pan the contents of the visor vertically. Default is true.
allowZooming(az) boolean createquery
Specifies whether or not the user should be able to zoom the contents of the visor. Default is true.
command(cmd) string createquery
Mel command which will return a list of nodes to add to a folder
deleteFolder(deleteFolder) string createquery
Delete the specified folder and all of its children
editFolder(edf) string createquery
Edit the name and MEL command for an existing folder
folderList(fl) string query
Return a string array of the folders in the visor.
menu(mn) string createquery
Set the name of the script to run to get a popup menu
name(n) string createquery
Name of the new folder
nodeType(ntp) string createquery
A node type used by folders of type nodeTypeInDAG
openDirectories(opd) boolean createquery
When adding a new folder indicate if it sub directories will be show. The default is to not show sub directories.
openFolder(opf) boolean createquery
When adding a new folder indicate if it will be open or closed by default. The default is closed.
parent(p) string createquery
Parent folder of this folder
path(pth) string createquery
Path to a file system directory to be displayed in the folder
popupMenuScript(pms) string createquery
Specifies the script to be called when the right mouse button is pressed in the visor. The name of the editor in which the right mouse button was pressed will be appended to the script at the time the script is called.
rebuild(re) boolean createquery
Rebuild the visor after interactively adding a folder
refreshAllSwatches(ras) boolean createquery
Refresh the swatches of all files currently displayed in this visor.
refreshSelectedSwatches(rss) boolean createquery
Refresh the swatches of all files currently selected in any visor.
refreshSwatch(rs) string createquery
Refresh the swatch of the file with the specified path.
reset(rst) boolean createquery
Clear all previously loaded folder descriptions in preperation for building a new visual browser
restrictPanAndZoom(rpz) boolean createquery
Specifies whether the panning and zooming of the visor should be restricted to keep the contents in the top left corner of the visor when they are smaller than the visible area within the visor. Default is true.
saveSwatches(ss) boolean createquery
Save swatches to disk for currently displayed image files.
scrollBar(sb) string createquery
Set the name of the scroll bar associated with visor
scrollPercent(sp) float createquery
Set the percentage value for the scroll bar. Typically called from a a scroll bars callback.
selectedGadgets(sg) string query
Return a string array of the currently selected gadgets (files, folders, nodes) in the visor.
showDividers(sd) boolean createquery
Specifies whether or not the visor should show dividers. The default is true. If -showDividers is set to false, dividers will be drawn as folders instead.
showFiles(sfi) boolean createquery
Specifies whether or not the visor should show files. The default is true.
showFolders(sfo) boolean createquery
Specifies whether or not the visor should show folders. The default is true.
showNodes(sn) boolean createquery
Specifies whether or not the visor should show nodes. The default is true.
stateString(sts) boolean createquery
Return the MEL command string to save the folder setup in visor
style(stl) string createquery
Set display style for the browser. Options are: outliner A single column with an outliner style icon and a text label singleColumn A single column with an image style icon and a text label multiColumn A multiple column grid of swatches with the text label below the swatch
transform(trn) string createquery
Name of a transform node used by folders of type nodeTypeInDAG
type(typ) string createquery
Type of the new folder. Options are:

  • command
    A mel command that will return a list of depend nodes that will be displayed in the folder
  • connectedNodes
    The nodes connected to the specified node name will be displayed in the folder
  • defaultNodes
    A mel command that will generate default node types. These nodes will not be part of the scene and are used for drag and drop creation of new nodes that are in the scene. The mel command use with this type is usually "listNodetypes".
  • directory
    A directory name in the file system
  • directoryCommand
    A mel command that will return a directory name in the file system
  • folder
    An empty folder(the default value). Empty folders can be used as user defined folders by dropping dependency graph nodes in to them
  • nodeTypeInDAG
    List all nodes of a given type under a specified transforms in the DAG. For example list all the shaders for a character by specifying the top transform of the character
  • shelfItems
    A directory containing mel files to use as shelf items

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.

Python examples

import maya.cmds as cmds

# The visor command is not one which would commonly be used by the user.
# For examples of its use, refer to visorPanel.mel and addVisorFolders.mel.