Apr 2012
1 / 5
Apr 2012
Apr 2012

I want to do "ls" command ignoring namespace.

There are objects "ABC_TAG", "NS:XYZ_TAG".

If i do
   ls "'*_TAG";
I get "ABC_TAG" only...

and if I do
   ls ":_TAG";
I get "NS:XYZ_TAG" only.. :frowning:

I can't find the way to get them all together.

I just need to filter "TAG" like postfix.
Is there a solution to do that?

  • created

    Apr '12
  • last reply

    Apr '12
  • 4

    replies

  • 5.2k

    views

  • 1

    user

Hey Man ! I don't Have the entire Solution.

But ... If you didn't see in the Mel Command help you can use the relativeName flag of the namespace command to kind of disable it. Seems like you should reactivate it right after doing your string selection.

I tried it with ls ":_TAG" and it seems to select only the other part.

It feel a bit messy like that but it's a start... I guess.

Hope it Helps. 

A quick look at the documentation for the LS command yields this information:

[url=][b]recursive/b[/url] boolean
When set to true, this command will look for name matches in all namespaces.
When set to false, this command will only look for matches in namespaces that
are requested (e.g. by specifying a name containing the ':'... "ns1:pSphere1").

Thanks all of you~
I use cmds.ls("*_TAG", r=1)

it works~. I have to read the document in depth.

Oh ! that's right I didn't see that flag. Much more efficient !

Nice. Thanks you.