From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

API examples

Hi, here you can find examples of current Python import and export API.

Creating datablocks

For example:

me = bpy.data.add_mesh("Mesh")

Removing datablocks

bpy.data.remove_mesh(me)

File selector

From within operator's invoke:

wm = context.manager
wm.add_fileselect(self.__operator__)

Object

Object Methods

Object.create_render_mesh([apply_matrix, [custom_matrix]])
Object.create_dupli_list()
Object.free_dupli_list()

Mesh

Mesh Methods


Main

Main Methods

Main.add_object(type, name)
Main.add_mesh(name)
Main.remove_mesh(name)