Quick question: object renaming

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2004   #1
Quick question: object renaming

Hi,

I've got a simple (as it seems to me) problem:

bipname=SelectByName title:"Pick a biped root" single:true
After the var bipname has the current Biped name, like "Bip01" or "MyBiped", the script must make a series of renamings like this:
$'Bip01 L Calf'.name = "LeftLeg"
$'Bip01 L Finger02'.name = "LeftHandThumb3"
$'Bip01 R Finger4Nub'.name = "RightHandPinky4"
etc.
So the question is, how can I put together the value of the string var "bipname" and a string " L Calf'.name" for example, to make it like (bipname + 'L Calf'.name) = "Pelvis" but with a proper syntax.

Please Help!
Thank You.
 
Old 02 February 2004   #2
I think I get your qeustion.. You asking how to rename the elements of a standard bi-ped regardless of the name of the bi-ped.. correct...

You need the execute command.

Your string name of your Bi-ped is in var:bipname.

then construct a maxscript command IN a string to rename an item.

(
-- dynamically build the maxscript command to be executed
ExStr = ("$'"+bipname+" L Calf'.name = \"LeftLeg\"" )

-- prints out the maxscript for review
format "%\n" Exstr

-- executes the maxscript in the string ExStr
execute ExStr
)


\" = a " in a string var.


Hope this helps..I don't have CS at hand so I couldn't test it on a rig, but it worked on a box.

Keith Morrison
focus360.com

Last edited by Kramsurfer : 02 February 2004 at 05:46 PM.
 
Old 02 February 2004   #3
Thanks Kramsurfer!
 
Old 01 January 2006   #4
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:53 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.