paya.lib.attrs#

expandAttrListToParentsAndChildren(attrList, instances=True)#

Given a list of attributes, expands to include compound children.

Parameters
  • attrList (list of str or Attribute) – the list of attributes to expand

  • instances (bool) – return Attribute instances rather than strings; defaults to True

Returns

The expanded attribute list.

Return type

list of str or Attribute

reorder(node, *attrNames)#

Rebuilds attributes in the specified order. The attributes must be dynamic, animatable and not compounds or multis. Lock states are dodged and connections are preserved:

Parameters
  • node (str, DependNode) – the node that carries the attributes

  • attrNames (list of str, str) – the names of the attributes to reorder, in the preferred order

Returns

The rebuilt attributes.

Return type

list of Attribute

class Section(sectionAttr, owner)#
node()#
Returns

The owner node.

Return type

DependNode

attr()#
Returns

The section attribute.

Return type

Enum

sendAbove(attrName)#

Send this section and its members above the specified attribute in the channel box.

Parameters

attrName (str) – the reference attribute name

Returns

self

Return type

Section

sendBelow(attrName)#

Send this section and its members below the specified attribute in the channel box.

Parameters

attrName (str) – the reference attribute name

Returns

self

Return type

Section

collect(*attrNames, top=False)#
Parameters
  • attrNames (list of str) – the names of the attributes to move into this section

  • top (bool) – insert the attributes before existing members rather than after; defaults to False

Returns

self

Return type

Section

__str__()#
Returns

The section name.

Return type

str

class Sections(owner, attrName)#

Inheritance

AccessorOnNode Accessor

__getitem__(indexOrKey)#
Parameters

indexOrKey (int or str) – the section index or name

Returns

A manager object for the section.

Return type

Section

names()#
Returns

The names of all available sections.

Return type

list of str

__iter__()#
Returns

an iterator of Section objects

__len__()#
Returns

the number of section attributes on the node

Return type

int

__contains__(sectionName)#
Parameters

sectionName – the section name

Returns

True if the section name exists, otherwise False

add(sectionName)#

Creates a new attribute section.

Parameters

sectionName – the name of the section

Returns

A manager object for the new section.

Return type

Section

__delitem__(indexOrKey)#
Parameters

indexOrKey (str or int) – can be a list index or a section name

clear()#

Removes all section attributes from the node. Member attributes are not removed.