Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.


createAttrPatterns([patternDefinition=string], [patternFile=string], [patternType=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

createAttrPatterns is undoable, NOT queryable, and NOT editable.

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.

Return value

stringName of created pattern


attribute, pattern


addAttr, addExtension, applyAttrPattern, deleteAttrPattern, listAttrPatterns


patternDefinition, patternFile, patternType
Long name (short name) Argument types Properties
patternType(pt) string create
Name of the pattern definition type to use in creating this instance of the pattern.
patternFile(pf) string create
File where the pattern information can be found
patternDefinition(pd) string create
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 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.

Python examples

import maya.cmds as cmds

import maya.cmds as cmds
cmds.createAttrPatterns( patternType="xmlPattern", patternFile="patterns/patternFile.xml" )
// Result: [myXMLPattern] //