5
$\begingroup$

Is there a way to batch rename objects in a sequence similar to: object1, object2, object3...? Where 'object' would be any custom name?

I found the batch rename datablocks script and it was really helpful for renaming a group of objects but gives a sequence like: object.001, object.002, object.003

Is there any way to use this script to give the first kind of sequence?

$\endgroup$
  • 3
    $\begingroup$ Does this help? $\endgroup$ – p2or Jan 22 '17 at 20:14
  • 1
    $\begingroup$ Thanks poor! Looks like either that or the script below works well. Your link gives the option of connecting it with a hotkey which can be really nice too. $\endgroup$ – Animatoring Jan 23 '17 at 0:12
10
$\begingroup$
import bpy

for i, obj in enumerate(bpy.context.selected_objects, 1):
    bpy.context.scene.objects.active = obj
    obj.name = "object" + str(i)

Just replace "object" with "your name" and run this in the text editor (make sure you have all objects selected that you want renamed).

$\endgroup$
4
$\begingroup$

I'm sure there are dozens of add-ons floating around that do this since they are quite easy to code and thus a good way to learn python, but here's mine:

https://github.com/gregzaal/batch-renamer

batch renamer screenshot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.