#HB_Namer V1.0
#created by Holger Biebrach
#www.holgerbiebrach.com

import c4d
from  c4d import gui 


def main():
    objList=doc.GetSelection()
    nameinput = gui.InputDialog("Input Objectname", "name")
    doc.StartUndo()
    for x in objList:
        doc.AddUndo(c4d.UNDOTYPE_CHANGE_SMALL,x)
        x.SetName(nameinput)
    
     
    
   
    
    doc.EndUndo()
    c4d.EventAdd()
    c4d.CallCommand(100004769) 

if __name__=='__main__':
    main()
