pymel.core.windows.visor¶
- visor(*args, **kwargs)¶
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).
Flags:
Long Name / Short Name Argument Types Properties addFolder / add bool Add a new folder to the current visual browser addNodes / adn unicode 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 bool Specifies whether or not the user should be able to pan the contents of the visor horizontally. Default is true. allowPanningInY / apy bool Specifies whether or not the user should be able to pan the contents of the visor vertically. Default is true. allowZooming / az bool Specifies whether or not the user should be able to zoom the contents of the visor. Default is true. command / cmd unicode Mel command which will return a list of nodes to add to a folder deleteFolder / deleteFolder unicode Delete the specified folder and all of its children editFolder / edf unicode Edit the name and MEL command for an existing folder folderList / fl unicode Return a string array of the folders in the visor. menu / mn unicode Set the name of the script to run to get a popup menu name / n unicode Name of the new folder nodeType / ntp unicode A node type used by folders of type nodeTypeInDAG openDirectories / opd bool When adding a new folder indicate if it sub directories will be show. The default is to not show sub directories. openFolder / opf bool When adding a new folder indicate if it will be open or closed by default. The default is closed. parent / p unicode Parent folder of this folder path / pth unicode Path to a file system directory to be displayed in the folder popupMenuScript / pms unicode 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 bool Rebuild the visor after interactively adding a folder refreshAllSwatches / ras bool Refresh the swatches of all files currently displayed in this visor. refreshSelectedSwatches / rss bool Refresh the swatches of all files currently selected in any visor. refreshSwatch / rs unicode Refresh the swatch of the file with the specified path. reset / rst bool Clear all previously loaded folder descriptions in preperation for building a new visual browser restrictPanAndZoom / rpz bool 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 bool Save swatches to disk for currently displayed image files. scrollBar / sb unicode Set the name of the scroll bar associated with visor scrollPercent / sp float Set the percentage value for the scroll bar. Typically called from a a scroll bars callback. selectedGadgets / sg unicode Return a string array of the currently selected gadgets (files, folders, nodes) in the visor. showDividers / sd bool 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 bool Specifies whether or not the visor should show files. The default is true. showFolders / sfo bool Specifies whether or not the visor should show folders. The default is true. showNodes / sn bool Specifies whether or not the visor should show nodes. The default is true. stateString / sts bool Return the MEL command string to save the folder setup in visor style / stl unicode 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 unicode Name of a transform node used by folders of type nodeTypeInDAG type / typ unicode 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 folderconnectedNodes The nodes connected to the specified node name will be displayed in the folderdefaultNodes 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 systemdirectoryCommand A mel command that will return a directory name in the file systemfolder An empty folder(the default value). Empty folders can be used as user defined folders by dropping dependency graph nodes in to themnodeTypeInDAG 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 charactershelfItems A directory containing mel files to use as shelf itemsFlag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.visor
Example:
import pymel.core as pm # 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.