A name space is a virtual space in which all objects must have unique names. This gives you a way of handling multiple objects with the same name, by putting each in a distinct namespace.
To create a namespace during file referencing
The file is referenced into the parent scene. If you open the Outliner, you can see that the object names for the referenced objects are all prefixed with the file’s name.
To create a namespace manually
You can edit namespaces with the Namespace Editor ( Window > General Editors > Namespace Editor) or from within the Reference Editor. For more information see Reference Editor overview and Work with file references.
In addition to options available in the above windows, you can also use the command line to set the current namespace.
You can turn the display of namespaces on or off in the Outliner, Channel Box, and Layer Editor.
When using namespaces, object names can sometimes get very long. This can make it difficult to differentiate objects by name. Turning off the display of namespaces replaces the namespace portion of a node’s name (if any) with “...:”. The shortened name makes it easier to distinguish between different objects in your scene.
To turn on/off the display of namespaces in the Outliner
When this menu item is turned on, the display of namespaces is turned on for the Outliner. Turn this item off to turn the display of namespaces off for the Outliner.
To turn on/off the display of namespaces in the Channel Box
When this menu item is turned on, the display of namespaces is turned on in the Channel Box. Turn off this item to turn the display of namespaces off for the Channel Box.
To turn on/off the display of namespaces in the Layer Editor
You can refer to namespaces relative to the current namespace. This can help streamline the Outliner and allows you to simplify MEL commands by eliminating the need to constantly include the namespace.
For example, if you had a cube in a namespace named cube_space and set the current namespaces to cube_space, you could use the command setAttr pCube1.translateX rather than having to specify setAttr cube_space:pCube1.translateX.
To display namespaces relative to a particular namespace
namespace -set "cube_space"
Replace cube_space with the namespace you want to set to current.
namespace -rel on
Maya displays all the namespaces in the Outliner relative to the namespace set in step 1. If a node is not within that namespace, its name is preceded with “:” followed by its own namespace.
There may be situations where you need to remove nodes from a particular namespace and subsequently remove the reserved namespace altogether from the scene. These situations might be as follows:
You can do this using the namespace MEL command or the Namespace Editor ( Window > General Editors > Namespace Editor).
The next two procedures show you how to remove nodes from an existing namespace in a scene, and then remove the reserved namespace from the scene using the namespace MEL command.
To remove a specified namespace for all nodes in a scene
The namespace for the object/node appears in the Channel Box, Outliner, or other editor when it is selected. An object’s name with an assigned namespace would appear as follows:
lowRes:pSphere
namespace -mv “lowRes” “:” -f
Any nodes that had the lowRes namespace now have no namespace specified. That is, the : specifies the default namespace and the -f flag forces the command even if it produces naming conflicts. As a result, nodes with identical names will be assigned an incremental number.
To remove a reserved namespace, you must first ensure that no nodes in the scene currently reside within that namespace. For more information, see the above procedure.
To remove a reserved namespace from a file
namespace -rm “lowRes”