PDA

View Full Version : Adding a Prefix to selected Objects


CronoC
02-07-2008, 07:37 PM
Hello Everyone,

Sorry for my noob question...but how would you go about adding a prefix to the selected objects in a scene? Like i'd have a button with a specific prefix, and as you click on it, it adds it to the selected object. I can't get the adding the prefix part to work... :(

Any help is greatly appreciated :D

Thanks in advance!

Crono

JHN
02-07-2008, 07:54 PM
Hi Crono,


thePrefix = "Prefix_"
for o in (selection as array) do o.name = thePrefix + o.name


Should do the trick... :)

-Johan

JHN
02-07-2008, 07:55 PM
--double post please delete--

CronoC
02-07-2008, 08:47 PM
Thank you so much!! It works! :)

PEN
02-07-2008, 08:58 PM
How about using the tool that has been there for years and is built in.

Tools/Rename Objects

RustyKnight
02-07-2008, 09:45 PM
How about using the tool that has been there for years and is built in.

Tools/Rename ObjectsYou'll put us all out of job Paul!! ;)

CGTalk Moderation
02-07-2008, 09:45 PM
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.