pymel.core.system.Namespace

Inheritance diagram of Namespace

class Namespace
clean(haltOnError=True, reparentOtherChildren=True)

Deletes all nodes in this namespace

Parameters:
  • haltOnError (bool) – If true, and reparentOtherChildren is set, and there is an error in reparenting, then raise an Exception (no rollback is performed); otherwise, ignore the failed reparent, and continue
  • reparentOtherChildren (bool) – If True, then if any transforms in this namespace have children NOT in this namespace, then will attempt to reparent these children under world (errors during these reparenting attempts is controlled by haltOnError)
classmethod create(name)
classmethod getCurrent()
getNode(nodeName, verify=True)
getParent()
listNamespaces(recursive=False, internal=False)

List the namespaces contained within this namespace.

Parameters:
recursive : bool
Set to True to enable recursive search of sub (and sub-sub, etc) namespaces
internal : bool
By default, this command filters out certain automatically created maya namespaces (ie, :UI, :shared); set to True to show these internal namespaces as well
listNodes(recursive=False, internal=False)

List the nodes contained within this namespace.

Parameters:
recursive : bool
Set to True to enable recursive search of sub (and sub-sub, etc) namespaces
internal : bool
By default, this command filters out nodes in certain automatically created maya namespaces (ie, :UI, :shared); set to True to show these internal namespaces as well
ls(pattern='*', **kwargs)
move(other, force=False)
remove(haltOnError=True, reparentOtherChildren=True)

Removes this namespace

Recursively deletes any nodes and sub-namespaces

Parameters:
  • haltOnError (bool) – If true, and reparentOtherChildren is set, and there is an error in reparenting, then raise an Exception (no rollback is performed); otherwise, ignore the failed reparent, and continue
  • reparentOtherChildren (bool) – If True, then if any transforms in this namespace have children NOT in this namespace, then will attempt to reparent these children under world (errors during these reparenting attempts is controlled by haltOnError)
setCurrent()
shortName()
splitAll()