Create a new instance of an attribute pattern given a pattern type (e.g. XML) and a string or data file containing the description of the attribute tree in the pattern’s format.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
patternDefinition (pd) | unicode | ||
Hardcoded string containing the pattern definition, for simpler formats that don’t really need a separate file for definition.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
patternFile (pf) | unicode | ||
|
|||
patternType (pt) | unicode | ||
|
Derived from mel command maya.cmds.createAttrPatterns
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.createAttrPatterns( patternType="xmlPattern", patternFile="patterns/patternFile.xml" )
// Result: [myXMLPattern] //