Data Access (

This module is used for all blender/python access.

Access to blenders internal data

Type :bpy.types.BlendData
import bpy

# print all objects
for obj in

# print all scene names in a list

# remove mesh Cube
if "Cube" in
    mesh =["Cube"]
    print("removing mesh", mesh)

# write images into a file next to the blend
import os
file = open(os.path.splitext([0] + ".txt", 'w')

for image in
    file.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1]))


Previous topic

Context Access (bpy.context)

Next topic

Operators (bpy.ops)