Append via Python

Can I append objects to my .blend file by way of a Python script?

AFAIK no. Would be a good idea for a feature though.


I’m not sure if I am saying something stupid. :expressionless: But isn’t the Python Scripting tutorial in the Blender 2.3 Guide adding a mesh object to a Scene and thus adding a object to the .blend?
Or is a mesh object different from what you mean with an object? And if so what is the difference?

###### Creates new Mesh
poly = NMesh.GetRaw()
###### Creates a new Object with the new Mesh
polyObj = NMesh.PutRaw(poly)

Append like the File -> Append function.
This means taking data from another blend file. Of course, adding a mesh directly in python is easy, it’s the loading from the other file part that is harder.


I’m ashamed :slight_smile:


I’m a beginner in python scripting and I’m looking for this too. Unfortunately, I haven’t found yet.

Is it possible to convert (export) a .blend file in xml, ac3d, or another format that can easy read by a script ? And then with the new file, can we append a object to a scene (also with a script) ?

I think it’s possible to export to xml format, but not import (however, BlendXML try to do this, but I don’t know if it works). Somebody has an idea ? Which format do you advise ?

(sorry for my bad english ^^)