I was wondering if it was possible to batch rename objects with python, while still keeping a basic naming convention intact.

Is it possible?enter image description here

  • $\begingroup$ Explain your problem properly $\endgroup$
    – Karan
    Commented Jul 24, 2022 at 18:57
  • $\begingroup$ If you can describe the naming convention algorithmically you can write Python code to do the renaming. You may want to look at the old [Simple Renaming Panel] addon for an example of how to write code that does this in a generalized fashion. $\endgroup$ Commented Jul 24, 2022 at 23:43

1 Answer 1


I have no idea what you mean by "basic naming convention". There is no such a thing for all I know, but you can rename objects with Python in Blender any way you can possibly imagine.

For example if I wanted to name all selected objects that are in the negative x side "Left" and all objects in the positive x side "Right" I could execute this in the text editor:

import bpy 

for o in bpy.context.selected_objects: 
    lx = o.location.x
    o.name = "Left " * (lx<0) + "Right " * (lx>0) + o.name

enter image description here

It doesn't need to be this simple - you can program any naming rules and conditions you can imagine with Pyhton. If you need help with this, Blender Stack Exchange is a great place to get it - just ask a more specific question.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .