mesh fabrication

fabricating other objects

material slots

animation and fcurves

incorporating python libraries


shape keys

animating curve bevel


UV layers



video sequence editor (VSE)

images and textures

analytic geometry

node trees


# Link assets from a separate blend file.

import bpy

def library_get(name, data_blocks, libpath=None):
    """ Since it is possible for a .blend file to have several objects 
with the same name linked from different files, this routine lets us 
hunt down the right one. """
    for x in data_blocks:
        if == name and x.library is not None:
            if libpath is None or libpath == x.library.filepath:
                return x
    return None

def addGroupToScene(grp, scn):
    for obj in grp.objects:


fname = "//cube.blend"

with, link=True) as (src, dst):
    # src has many properties, each of which is a list of name strings.
    # dst is how we specify what we want to link from the library file.

    # let's link the "dazed" scene
    dst.scenes = ["dazed"]
    # and the "omnitile" object
    dst.objects = ["omnitile"]
    # and an object group
    dst.groups = ["frog"]
    # and just to be fancy, let's count up how many linkable things there are
    for dbt in dir(src):
        name_list = getattr(src, dbt)
        print("%s[%d]" % (dbt, len(name_list)))

# just because we linked an object doesn't mean that object is in any of our scenes.
omnitile = library_get("omnitile",

scn = bpy.context.scene
    # now it is.

# link all the objects from group "frogs" to the current scene
addGroupToScene(library_get("frogs",, scn)

Blender python API quick-start

Syntax highlighting by Pygments.