pymel.util.alias

alias(origAttrName)

Returns a property which is simply an alias for another property.

Acts simply to provide another name to reference the same underlying attribute; useful when subclassing, where a subclass might have a more descriptive name for an attribute that has the same function.

The only purpose of this function is to produce more readable code.

Example:

>>> class GenericExporter(object):
...     def __init__(self, outFile):
...         self.outFile = outFile
...
>>> class CowExporter(GenericExporter):
...     cowFile = alias('outFile')
...
>>> CowExporter('bessie.cow').cowFile
'bessie.cow'

Previous topic

pymel.util.addLazyDocString

Next topic

pymel.util.all

Core

Core Modules

Other Modules

This Page