pymel.core.general.listAttr

listAttr(*args, **kwargs)

This command lists the attributes of a node. If no flags are specified all attributes are listed.

Modifications:
  • returns an empty list when the result is None
Flags:
  • array : a (bool) [create]

    only list array (not multi) attributes

  • caching : ca (bool) [create]

    only show attributes that are cached internally

  • changedSinceFileOpen : cfo (bool) [create]

    Only list the attributes that have been changed since the file they came from was opened. Typically useful only for objects/attributes coming from referenced files.

  • channelBox : cb (bool) [create]

    only show non-keyable attributes that appear in the channelbox

  • connectable : c (bool) [create]

    only show connectable attributes

  • hasData : hd (bool) [create]

    list only attributes that have data (all attributes except for message attributes)

  • hasNullData : hnd (bool) [create]

    list only attributes that have null data. This will list all attributes that have data (see hasData flag) but the data value is uninitialized. A common example where an attribute may have null data is when a string attribute is created but not yet assigned an initial value. Similarly array attribute data is often null until it is initialized.

  • keyable : k (bool) [create]

    only show attributes that can be keyframed

  • leaf : lf (bool) [create]

    Only list the leaf-level name of the attribute. controlPoints[44].xValue would be listed as xValue.

  • locked : l (bool) [create]

    list only attributes which are locked

  • multi : m (bool) [create]

    list each currently existing element of a multi-attribute

  • output : o (bool) [create]

    List only the attributes which are numeric or which are compounds of numeric attributes.

  • ramp : ra (bool) [create]

    list only attributes which are ramps

  • read : r (bool) [create]

    list only attributes which are readable

  • readOnly : ro (bool) [create]

    List only the attributes which are readable and not writable.

  • scalar : s (bool) [create]

    only list scalar numerical attributes

  • scalarAndArray : sa (bool) [create]

    only list scalar and array attributes

  • settable : se (bool) [create]

    list attribute which are settable

  • shortNames : sn (bool) [create]

    list short attribute names (default is to list long names)

  • string : st (unicode) [create]

    List only the attributes that match the other criteria AND match the string(s) passed from this flag

  • unlocked : u (bool) [create]

    list only attributes which are unlocked

  • usedAsFilename : uf (bool) [create]

    list only attributes which are designated to be treated as filenames Flag can have multiple arguments, passed either as a tuple or a list.

  • userDefined : ud (bool) [create]

    list user-defined (dynamic) attributes

  • visible : v (bool) [create]

    only show visible or non-hidden attributes

  • write : w (bool) [create]

    list only attributes which are writable

Derived from mel command maya.cmds.listAttr

Previous topic

pymel.core.general.license

Next topic

pymel.core.general.listConnections

Core

Core Modules

Other Modules

This Page