What are namespaces?


A namespace provides a way to give Maya objects unique identification. This unique naming scheme derives from the combination of the namespace name followed by an object's name , or full DAG path (if the object is a DAG object). Namespaces resolve possible object name-clash issues in Maya when referencing or importing files into an open scene.

Using namespaces, you can have two objects with the same name in the same scene as long as they are contained in different namespaces. For example, in your scene you can have two objects named pSphereSoccerBall, but with different namespaces soccerGame1 and soccerGame2.

Conceptually, namespaces can be thought of as being similar to the hierarchal structure of a file system, with namespaces being similar to directories and scene objects similar to files. The colon (':') character is the separator used to separate the names of namespaces and nodes instead of the slash ('/') or backslash ('\') character.

You can also nest namespaces to create a hierarchy. Namespace hierarchies start with a root namespace followed by parent and child namespaces. You can create namespace hierarchies using the Namespace Editor.

Namespaces can contain other namespaces as well as objects. Like objects, the names of namespaces must be unique within another namespace. Objects and namespaces can be in only one namespace. Namespace names and object names don't clash so a namespace and an object contained in another namespace can have the same name.

You can create and edit namespaces using the Namespace Editor. You can also create namespaces in the Reference Options window when referencing file or in the Import Options window when importing files. When you reference or import files, you can choose to use either the reference/imported file's name or specify a string as a namespace.

Related topics

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License