pymel.core.general.listAttrPatterns¶
- listAttrPatterns(*args, **kwargs)¶
Attribute patterns are plain text descriptions of an entire Maya attribute forest. (forestbecause 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.
Flags:
Long Name / Short Name Argument Types Properties patternType / pt bool If turned on then show the list of pattern types rather than actual instantiated patterns. verbose / v bool 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 have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.listAttrPatterns
Example:
import pymel.core as pm import maya.cmds as cmds pm.listAttrPatterns() // Return: ["approvalAttrs", "sceneAndShotAttrs"] // pm.listAttrPatterns( patternType=True ) // Return: "xmlPatternFactory" // pm.listAttrPatterns( patternType=True, verbose=True ) // Return: ["xmlPatternFactory", "xmlPatternFactory/approvalAttrs", "xmlPatternFactory/sceneAndShotAttrs"] // pm.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"] //