I'm trying to figure out a way to query what objects are in each namespace in my file. Let's assume that I've imported and/or referenced a dozen objects with use namespace turned on so that they all reside in a unique namespace.
I can use 'namespaceInfo -lon' to get an array of my namespaces.
I can use 'namespaceInfo -ls ' to get an array of the objects in the current namespace.
However, I can find no way to get an array of a specified namespace.
I was hoping I could do something like:
$nameSpaces = `namespaceInfo -lon`;
$objects = `namespaceInfo -ls $nameSpaces `;
That doesn't work though. I tried setting the namespace first:
namespace -set $nameSpaces;
but that seems to put me into a state where Maya can no longer find any of the other namespaces.