This is the class for the commands that edit and/or query templates. In query mode, return type is based on queried flag.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
exists (ex) | bool | ||
Returns true or false depending upon whether the specified template exists. When used with the matchFile argument, the query will return true if the template exists and the filename it was loaded from matches the filename given. |
|||
fileName (fn) | unicode | ||
Specifies the filename associated with the template. This argument can be used in conjunction with load, save or query modes. If no filename is associated with a template, a default file name based on the template name will be used. It is recommended but not required that the filename and template name correspond. |
|||
force (f) | bool | ||
This flag is used with some actions to allow them to proceed with an overwrite or destructive operation. When used with load, it will allow an existing template to be reloaded from a file. When used in create mode, it will allow an existing template to be recreated (for example when using fromContainer argument to regenerate a template). |
|||
load (l) | bool | ||
Load an existing template from a file. If a filename is specified for the template, the entire file (and all templates in it) will be loaded. If no file is specified, a default filename will be assumed, based on the template name. |
|||
matchFile (mf) | unicode | ||
|
|||
silent (si) | bool | ||
|
|||
unload (u) | bool | ||
Unload the specified template. This action will not delete the associated template file if one exists, it merely removes the template definition from the current session. |
|||
viewList (vl) | unicode | ||
Used in query mode, returns a list of all views defined on the template.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.baseTemplate
Example:
import pymel.core as pm
# Determine if template exists
#
pm.baseTemplate ('foo.xml', exists=True)
# Result: False #
#