PDA

View Full Version : renaming objects


mattoso
01-10-2007, 04:27 PM
hi
im sure this is v.simple but i cant seem to find it anywhere in the MAX Reference.
If I want to rename all objects called "myobject01, myobjects02,...etc" how do i do it. I tried this but it didney work.


fn Renamed obj =
(
if obj.name == $myobject* then
(
obj.name = "new_name"
)
)

for obj in objects do
(
Renamed obj
)

mustan9
01-10-2007, 04:37 PM
$myobject*.name = "new_name"

or

select $myobject*
$.name = "new_name"

Wahooney
01-11-2007, 05:32 AM
If you just need a renaming tool you can check out my Renaming Army Knife (http://www.wahooney.net/download.php?view.18).

You can also use the code freely to find your own solution.

j-man
01-11-2007, 09:21 AM
There is a function to generate a unique name based on a string, so when you have a selection of objects:

for s in selection do s.name=(uniquename "myobject")

Cheers,

Josh.

mattoso
01-14-2007, 12:13 PM
Thanks for the replies, really helpful.

CGTalk Moderation
01-14-2007, 12:13 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.