PDA

View Full Version : MEL: listing objects by partial name


bentllama
01-25-2003, 12:08 AM
...is there a way in MEL where I can list objects based on a section of their name?

For example I want to list all objects in my scene that are named with the prefix " c_ " so I can tozenize that list and run commands on each node in the list...

...the only part I am truly lost on is how to list objects by part of their name...

...can you help me?

Gracias.

mark_wilkins
01-25-2003, 01:32 AM
Sure!

ls "c_*"


-- Mark

bentllama
01-25-2003, 05:03 AM
why do I let my momentary lapse of common MEL sense and befuddlement get the best of me, and lead me to waste your time Mark? LOL :rolleyes:

print `ls "c_*"`;

I kept putting a "-" in front of "c_*"... treating it lie an "ls -sl"...

[ie: print `ls -"c_*"` ;]

*sigh*

This was MEL at the time the posting of this thread ---> :wip:
This was me ----------------------------------------> :hmm:


Your book is really handy too Mark, thanks.

mark_wilkins
01-25-2003, 07:30 PM
Thanks for the kind comment on the book!

Honestly, it wasn't a big imposition to type my brief response. However, if you have the book you should look at the chapter on naming, because there are a few useful scripts for dealing with applying prefixes to the names of nodes that demonstrate things like this.

-- Mark

CGTalk Moderation
01-14-2006, 06:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.