List all namespaces[python]


#1

Is there a way to list all namespaces in the current scene?
Of course I can do ls(assemblies=1) and then rpartition(’:’)[0] the names of top groups but I would like to know if there is more “elegant” way to do this.


#2

Hey,

This seems to work. Only done a quick test though.

cmds.namespace(setNamespace=':')
namespaces = cmds.namespaceInfo(listOnlyNamespaces=True, recurse=True)


#3

Wow!
It works great! Thank you!