Batch rename objects with number sequence?

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?

• Does this help?
– p2or
Jan 22 '17 at 20:14
• 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. Jan 23 '17 at 0:12

Blender 2.79

import bpy

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


Blender 2.8+

import bpy

for i, obj in enumerate(bpy.context.selected_objects, 1):
bpy.context.view_layer.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).

• This didn't work for me when using Blender 2.8. changing line 4 to bpy.context.view_layer.objects.active = obj helped. update cheatsheet here => blenderartists.org/t/2-80-cheat-sheet-for-updating-add-ons/… Sep 28 '19 at 6:58
• Answer edited with Furkan's comment ... Thanks man :) BTW - How to number like 01, 001 style? Jan 15 at 10:04
• @vklidu What do you mean? You want to add leading zeroes all the time or you want to add a zero to each subsequent object in a sequence? Jan 18 at 16:37

Blender users can now do batch rename with (Menu: Edit ‣ Batch Rename and Hotkey: Ctrl+F2) without any add-ons. (blender +2.80)

An example: