This command is used to handle compatibility issues between file format versions by providing a mechanism to describe differences between two versions. Only plugin writers should have the potential need to use this command.The first optional command argument argument is a node name and the second optional command argument is an attribute name.Warning:Only use this command to describe changes in names or attributes of nodes that youhave written as plugins. Do notuse this command to change information about builtin dependency graph nodes.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
addAttr (a) | bool | ||
|
|||
clear (clr) | bool | ||
|
|||
dumpTable (dmp) | bool | ||
|
|||
enable (e) | bool | ||
|
|||
nodeRename (nr) | unicode | ||
|
|||
removeAttr (rm) | bool | ||
|
|||
renameAttr (r) | unicode | ||
|
|||
type (typ) | unicode | ||
|
|||
version (v) | unicode | ||
|
Derived from mel command maya.cmds.attrCompatibility
Example:
import pymel.core as pm
# Rename '.x' attributes in old files to '.tx' for all nodes
# of type 'transform'
#
pm.attrCompatibility( 'transform', 'x', r='tx' )
# Rename the old 'group' node to the new 'transform' node
#
pm.attrCompatibility( 'group', nr='transform' )
# This will cause all subsequent attrCompatibility calls to translate
# files from older versions to version 1.0.
#
pm.attrCompatibility( v='1.0' )