Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
listAttrPatterns([patternType=boolean], [verbose=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
listAttrPatterns is NOT undoable, NOT queryable, and NOT editable.
Attribute patterns are plain text descriptions of an entire Maya attribute forest. ("forest"
because there could be an arbitrary number of root level attributes, it's not restricted to
having a single common parent though in general that practice is a good idea.)
This command lists the various pattern types available, usually created via plugin, as well as
any specific patterns that have already been instantiated. A pattern type is a thing that knows
how to take some textual description of an attribute tree, e.g. XML or plaintext, and convert it
into an attribute pattern that can be applied to any node or node type in Maya.
string[] | List of patterns or pattern instances available |
attribute, pattern
addAttr, addExtension, applyAttrPattern, createAttrPatterns, deleteAttrPattern
patternType, verbose
Long name (short name) |
Argument types |
Properties |
patternType(pt)
|
boolean
|
|
|
If turned on then show the list of pattern types rather than actual instantiated patterns.
|
|
verbose(v)
|
boolean
|
|
|
If turned on then show detailed information about the patterns or pattern types.
The same list of instance or pattern names is returned as for the non-verbose case.
|
|
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.
|
import maya.cmds as cmds
import maya.cmds as cmds
cmds.listAttrPatterns()
// Return: ["approvalAttrs", "sceneAndShotAttrs"] //
cmds.listAttrPatterns( patternType=True )
// Return: "xmlPatternFactory" //
cmds.listAttrPatterns( patternType=True, verbose=True )
// Return: ["xmlPatternFactory", "xmlPatternFactory/approvalAttrs", "xmlPatternFactory/sceneAndShotAttrs"] //
cmds.listAttrPatterns( verbose=True )
Pattern approvalAttrs
PatternFactory xmlPatternFactory:
File: "attrPatterns/approvalAttrs.xml"
Attribute Count: 8
Attribute Tree:
fxApproval (compound)
fxApprover (string)
fxApprovalDate (int)
fxApprovalState (enum)
layoutApproval (compound)
layoutApprover (string)
layoutApprovalDate (int)
layoutApprovalState (enum)
Pattern sceneAndShotAttrs
PatternFactory xmlPatternFactory:
File: "attrPatterns/sceneAndShotAttrs.xml"
Attribute Count: 4
Attribute Tree:
sceneId (int)
sceneOwner (string)
shotId (int)
shotOwner (string)
// Return: ["approvalAttrs", "sceneAndShotAttrs"] //