pymel.core.system.attrCompatibility

attrCompatibility(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
addAttr (a) bool ../../../_images/create.gif
 
Add the given attribute to the named node.
clear (clr) bool ../../../_images/create.gif
 
Clear out the compatibility table. This is only used internally for debugging purposes.
dumpTable (dmp) bool ../../../_images/create.gif
 
Dump the current contents of the compatibility table. This is only used internally for debugging purposes.
enable (e) bool ../../../_images/create.gif
 
Enable or disable the compatibility table. This is only used internally for debugging purposes.
nodeRename (nr) unicode ../../../_images/create.gif
 
Replace all uses of the node type ‘nodeName’ with given string.
removeAttr (rm) bool ../../../_images/create.gif
 
Remove the given attribute from the named node.
renameAttr (r) unicode ../../../_images/create.gif
 
Rename the given attribute name of the given node with the given string.
type (typ) unicode ../../../_images/create.gif
 
Change the type of the given attribute to the given type.
version (v) unicode ../../../_images/create.gif
 
Set the version target for subsequent commands to the given string. Flag can have multiple arguments, passed either as a tuple or a list.

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' )

Previous topic

pymel.core.system.attachDeviceAttr

Next topic

pymel.core.system.audioTrack

Core

Core Modules

Other Modules

This Page