Deleting all objects

How can i delete all objets created in blender with a python script ?

Je sais comment faire Sachem mais comme on est en concurrence, je te laisse chercher.

Vive Robot6 !!!


With publisher2.25: unlink …perhaps

With Blender 2.26

ob = Blender.Object.Get(“MyObj”)
sc = Blender.Scene.getCurrent()

This code will remove the object from the memory and the display. But the mesh will still be present in the MESH browse datablock (F5), untill you close and reopen the file.

To unlink all objects in the current scene:

sc = Blender.Scene.getCurrent()
objs = Blender.Object.Get()
for obj in objs:

This is just a little modification on duzoid’s script. The same thing applies, the mesh datablocks will stay there (unlinked) until the file is closed.