Your Ad Here

Go to: Synopsis. Flags. Return value. Keywords. 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=double], [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).

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
reset(rst) boolean createquery
Clear all previously loaded folder descriptions in preperation for building a new visual browser

In query mode, this flag needs a value.

addFolder(add) boolean createquery
Add a new folder to the current visual browser

In query mode, this flag needs a value.

deleteFolder(deleteFolder) string createquery
Delete the specified folder and all of its children

In query mode, this flag needs a value.

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

In query mode, this flag needs a value.

openFolder(opf) boolean createquery
When adding a new folder indicate if it will be open or closed by default. The default is closed.

In query mode, this flag needs a value.

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.

In query mode, this flag needs a value.

editFolder(edf) string createquery
Edit the name and MEL command for an existing folder

In query mode, this flag needs a value.

name(n) string createquery
Name of the new folder

In query mode, this flag needs a value.

parent(p) string createquery
Parent folder of this folder

In query mode, this flag needs a value.

command(cmd) string createquery
Mel command which will return a list of nodes to add to a folder

In query mode, this flag needs a value.

transform(trn) string createquery
Name of a transform node used by folders of type nodeTypeInDAG

In query mode, this flag needs a value.

nodeType(ntp) string createquery
A node type used by folders of type nodeTypeInDAG

In query mode, this flag needs a value.

path(pth) string createquery
Path to a file system directory to be displayed in the folder

In query mode, this flag needs a value.

rebuild(re) boolean createquery
Rebuild the visor after interactively adding a folder

In query mode, this flag needs a value.

scrollBar(sb) string createquery
Set the name of the scroll bar associated with visor

In query mode, this flag needs a value.

stateString(sts) boolean createquery
Return the MEL command string to save the folder setup in visor

In query mode, this flag needs a value.

scrollPercent(sp) double createquery
Set the percentage value for the scroll bar. Typicly called from a a scroll bars callback.

In query mode, this flag needs a value.

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

In query mode, this flag needs a value.

menu(mn) string createquery
Set the name of the script to run to get a popup menu

In query mode, this flag needs a value.

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

In query mode, this flag needs a value.

allowZooming(az) boolean createquery
Specifies whether or not the user should be able to zoom the contents of the visor. Default is true.

In query mode, this flag needs a value.

allowPanningInX(apx) boolean createquery
Specifies whether or not the user should be able to pan the contents of the visor horizontally. Default is true.

In query mode, this flag needs a value.

allowPanningInY(apy) boolean createquery
Specifies whether or not the user should be able to pan the contents of the visor vertically. Default is true.

In query mode, this flag needs a value.

showFolders(sfo) boolean createquery
Specifies whether or not the visor should show folders. The default is true.

In query mode, this flag needs a value.

showNodes(sn) boolean createquery
Specifies whether or not the visor should show nodes. The default is true.

In query mode, this flag needs a value.

showFiles(sfi) boolean createquery
Specifies whether or not the visor should show files. The default is true.

In query mode, this flag needs a value.

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.

In query mode, this flag needs a value.

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.

In query mode, this flag needs a value.

selectedGadgets(sg) string query
Return a string array of the currently selected gadgets (files, folders, nodes) in the visor.

In query mode, this flag needs a value.

folderList(fl) string query
Return a string array of the folders in the visor.

In query mode, this flag needs a value.

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.

In query mode, this flag needs a value.

saveSwatches(ss) boolean createquery
Save swatches to disk for currently displayed image files.

In query mode, this flag needs a value.

refreshAllSwatches(ras) boolean createquery
Refresh the swatches of all files currently displayed in this visor.

In query mode, this flag needs a value.

refreshSelectedSwatches(rss) boolean createquery
Refresh the swatches of all files currently selected in any visor.

In query mode, this flag needs a value.

refreshSwatch(rs) string createquery
Refresh the swatch of the file with the specified path.

In query mode, this flag needs a value.


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.

Return value


[string]

Keywords

render, hypergraph, shader, hypershade

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.
	

Return to Autodesk Index


Your Ad Here