How to shorten object names? I was basically wondering how you can shorten your object names automatically instead of going in and do it manually on countless of objects. 

I know there is a object renaming add-on, but this only renames all the objects. 

So, if anybody knows how I can just shorten the object names, I'd be very grateful!
This script renames all the objects and assigns a number.

import bpy

objects = bpy.context.scene.objects

for i in range(0, len(objects)):
    print(objects[i].name)
    objects[i].name = "object" + str(i)
    objects[i].data.name = "object" + str(i)