Namespaces
 
 
 

A namespace is a scoping mechanism for naming objects. You create a namespace, and within that namespace, all object names must be unique.

This gives you a way of handling multiple objects with the same name, by putting each in a distinct namespace. In general, namespaces form a packaging scheme for defining collections of objects. Youc an also nest namespaces to create a hierarchy.

The full, most complete name for any object begins with its namespace (possibly nested), followed by its name, or full DAG path (if the object is a DAG object).

Every object is in some namespace (usually the default one, named ":")

The namespace nesting hierarchy and the DAG parenting hierarchy are independent.

You can use a namespace in another namespace; that is, have a hierarchy of namespaces.

NoteDifferences between namespaces, prefixes, and sets

A prefix is a string applied when generating a name. Prefixes are mainly used as an option for renaming objects coming from a referenced file, and for the past few releases we have been strongly encouraging users to avoid the use of renaming prefixes in favor of namespaces.

A set is a Maya object that collects other objects. You can perform a variety of operations using sets to manipulate all the objects in a set. For example, some Maya editors let you keep a bookmark that is really just a set listing the objects to display in that editor.

Related topics