Habe mal den Code vom letzen Blender Post erweitert und
etwas Bewegung hinzugefügt. In ein Blender Skript kopieren und im Animationsfenster auf Play drücken.
12345678910111213141516171819202122232425262728
#import blender stuffimportbpy#loop through all objects in the scene#bpy.context.scene.objects is a listforobjinbpy.context.scene.objects:#use only real opbject, not the camera or lampifobj.type=='MESH':#select the current objectobj.select=True#remove the current selected object (which will always be obj)bpy.ops.object.delete()#create a new cube objectbpy.ops.mesh.primitive_cube_add(location=(0,0,0))#define a function which will be called every frame changedefmy_func(scene):obj=scene.objects[0]obj.location.x=scene.frame_current/50print("frame #",scene.frame_current)#remove all handlersforiinrange(len(bpy.app.handlers.frame_change_pre)):bpy.app.handlers.frame_change_pre.pop()#append handlerbpy.app.handlers.frame_change_pre.append(my_func)