Notifications
Clear all

[Closed] maxscript uniquename not giving different numbers

quick question guys

im trying to make a simple renamer to just name something based on scene name + prefix, but my uniquename doesnt seem to be increment. all my objects only get 001 so they all have the exact same name

here’s my code

on btn1 pressed do
(
for i in selection do i.name = “Thing_” + getFilenameFile maxFilename +”” + uniquename “

)

thanks in advance

2 Replies

Do it this way:

 for i in selection do i.name = uniquename ("Thing_" + (getFilenameFile maxFilename) +"_")

beautiful!! worked like a charm. Thank you so much!