Is there a way to remove namespaces in Maya? When I try search and replace the name with a blank space Maya won’t run the operation.
I recently discovered the Namespace Editor, under Window -> General Editors (2012). You can remove namespaces of non-referenced stuff there. You have to start with the child-most namespace, empty it, delete it, then move on to its parents.
Another way is find/replacing it in the .ma file itself, in a text editor.
nice… thanks!
instead of replacing with nothing (or a space), i believe you need to replace with the world namespace which is actually “:”
But yeah the namespace editor does help - sometimes lol.
Also, if you are trying to import things that you know won’t name-clash, and you don’t want it put inside a namespace, you can do
importFile(filepath, defaultNamespace=False)
where filepath is the path to a scene file.
The namespace editor is useful, but i just wrote my own recursive script to remove all namespaces, starting from the children and working backwards.
we end up with a TON of namespaces because artists are constantly exporting and importing data. It became such a problem that I had to globally disable namespaces during import.
In the UI based importer, the option to resolve only clashing nodes never worked - it always added a namespace_ , no matter what. This fix works, though a bit scary:
on line 1598 of scripts\others\fileOptions.mel, change this:
if ($action == "Import"&&$useNS)
to
if ($action == “Import”&&!$useNS)
You can just load the modified version of this file on startup, and then the importer option works as you’d expect it to… no namespace!