View Full Version : easy(?) renaming question
womanonfire 09-12-2003, 01:02 PM please look at this:
http://www.entropy8.com/live/rename.jpg
and tell me there is a way to batch-rename the Shape nodes to be the same as their parents.
i do not know how to phrase this correctly.
but polySurfaceShape11 *should* be named EntranceS3Shape for example.
my trouble it that when i export in .x format it names all the objects after these wrongly named Shapes and i have to go in and rename them by hand and it takes a long time.....
|
|
mhovland
09-12-2003, 01:28 PM
Sure is, try this out.
string $selObj[] = `ls -sl`;
for($i=0;$i<size($selObj);$i++)
{
string $shape[] = `listRelatives -s $selObj[$i]`;
rename $shape[0] ($selObj[$i] + "Shape");
}
Select all the transform nodes, and run the script :thumbsup:
womanonfire
09-12-2003, 04:16 PM
i can't believe it,.... it just works (^_^)
you saved me
thank you so much !
ps. in what shop can i find a Mel monkey...
could really use one ;)
mhovland
09-12-2003, 04:22 PM
Originally posted by womanonfire
i can't believe it,.... it just works (^_^)
you saved me
thank you so much !
You are quite welcome! Glad it worked for you.
ps. in what shop can i find a Mel Monkey... could really use one ;) [/B]
For the right salary, you can have me in your shop, or working for you. I'm open to contract work! :p
womanonfire
09-12-2003, 04:25 PM
will keep that in mind.
PsychoSilence
09-13-2003, 08:35 AM
Originally posted by mhovland
Sure is, try this out.
string $selObj[] = `ls -sl`;
for($i=0;$i<size($selObj);$i++)
{
string $shape[] = `listRelatives -s $selObj[$i]`;
rename $shape[0] ($selObj[$i] + "Shape");
}
Select all the transform nodes, and run the script :thumbsup:
i was wondering about the same question, but where do i have to type in this script (sorry for dumb question) :shrug:
mhovland
09-13-2003, 09:21 AM
Just paste it into the script editor. once it is there, you can either run it, or middle mouse it to a shelf, so you have a button.
CGTalk Moderation
01-16-2006, 02: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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.