pymel.core.other.NameParser

digraph inheritanced7a0511a86 {
rankdir=TB;
ranksep=0.15;
nodesep=0.15;
size="8.0, 12.0";
  "NameParser" [fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,URL="#pymel.core.other.NameParser",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8];
}

class NameParser
addPrefix(prefix)
addPrefixToName
attr(attr)

access to AttributeName of a node. returns an instance of the AttributeName class for the given AttributeName.

>>> NameParser('foo:bar').attr('spangle')
AttributeName('foo:bar.spangle')
namespace()
Returns the namespace of the object with trailing colon included
namespaceList()
Useful for cascading references. Returns all of the namespaces of the calling object as a list
stripNamespace(levels=0)

Returns a new instance of the object with its namespace removed. The calling instance is unaffected. The optional levels keyword specifies how many levels of cascading namespaces to strip, starting with the topmost (leftmost). The default is 0 which will remove all namespaces.

>>> NameParser('foo:bar.spangle').stripNamespace()
AttributeName('bar.spangle')
swapNamespace(prefix)
Returns a new instance of the object with its current namespace replaced with the provided one. The calling instance is unaffected.

Previous topic

pymel.core.other.DependNodeName

Next topic

pymel.core.rendering

Core

Core Modules

Other Modules

This Page