pymel.core.general.baseView

baseView(*args, **kwargs)

A view defines the layout information for the attributes of a particular node type or container. Views can be selected from a set of built-in views or may be defined on an associated container template. This command queries the view- related information for a container node or for a given template. The information returned from this command will be based on the view-related settings in force on the container node at the time of the query (i.e. the container’s view mode, template name, view name attributes), when applicable. In query mode, return type is based on queried flag.

Flags:
Long name (short name) Argument Types Properties
itemInfo (ii) unicode ../../../_images/query.gif
 

Used in query mode in conjunction with the itemList flag. The command will return a list of information for each item in the view, the information fields returned for each item are determined by this argument value. The information fields will be listed in the string array returned. The order in which the keyword is specified will determine the order in which the data will be returned by the command. One or more of the following keywords, separated by colons ‘:’ are used to specify the argument value. itemIndex : sequential item number (0-based)itemName : item name (string)itemLabel : item display label (string)itemDescription : item description field (string)itemLevel : item hierarchy level (0-n)itemIsGroup : (boolean 0 or 1) indicates whether or not this item is a groupitemIsAttribute : (boolean 0 or 1) indicates whether or not this item is an attributeitemNumChildren: number of immediate children (groups or attributes) of this itemitemAttrType : item attribute type (string)itemCallback : item callback field (string)

itemList (il) bool ../../../_images/query.gif
 

Used in query mode, the command will return a list of information for each item in the view. The viewName flag is used to select the view to query. The information returned about each item is determined by the itemInfo argument value. For efficiency, it is best to query all necessary item information at one time (to avoid recomputing the view information on each call).

viewDescription (vd) bool ../../../_images/query.gif
 
Used in query mode, returns the description field associated with the selected view. If no description was defined for this view, the value will be empty.
viewLabel (vb) bool ../../../_images/query.gif
 

Used in query mode, returns the display label associated with the view. An appropriate label suitable for the user interface will be returned based on the selected view. Use of the view label is usually more suitable than the view name for display purposes.

viewList (vl) bool ../../../_images/query.gif
 
Used in query mode, command will return a list of all views defined for the given target (container or template).
viewName (vn) unicode ../../../_images/query.gif
 

Used in query mode, specifies the name of the queried view when used in conjunction with a template target. When used in conjunction with a container target, it requires no string argument, and returns the name of the currently active view associated with the container; this value may be empty if the current view is not a valid template view or is generated by one of the built-in views modes. For this reason, the view label is generally more suitable for display purposes. In query mode, this flag can accept a value.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.baseView

Example:

import pymel.core as pm

import maya.cmds as cmds

# Obtain a list of all available views for template1
#
pm.baseView ( 'AEblinn', query=True, viewList=True);
#

Previous topic

pymel.core.general.baseTemplate

Next topic

pymel.core.general.color

Core

Core Modules

Other Modules

This Page