Notifications
Clear all

[Closed] renaming objects

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
)

4 Replies
$myobject*.name = "new_name"

or

select $myobject*
$.name = "new_name"

If you just need a renaming tool you can check out my Renaming Army Knife.

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

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.

Thanks for the replies, really helpful.