paya.lib.grouptree#

class GroupTree(*node, owner=None, key=None)#

Group trees are dict-like interfaces for quick generation of hierarchical group structures with cascading prefixes.

Example

import paya.runtime as r
from paya.lib.grouptree import GroupTree

with r:
    group = r.PyNode('L_arm_XFRM')
    tree = GroupTree(group)

    print(tree['controls']['shapers'].node())
    # Result: L_arm_controls_shapers_XFRM
root()#
Returns

The root GroupTree instance.

Return type

GroupTree.

keyPath()#
Returns

All the keys leading up to this node.

Return type

[str]

node(inheritsTransform=None, hide=None, create=True)#
Parameters
  • inheritsTransform/it (bool) – sets inheritsTransform on the node; defaults to None

  • create/c (bool) – create the group node if it doesn’t exist; defaults to True

  • hide/h (bool) – hide the node; defaults to None

Returns

The transform node at the current key.

Return type

Transform