$Id: api-proposal.html,v 1.1 2001/05/07 10:16:32 strubi Exp $

-- DRAFT --

What's Python good for?

Introduction

If you are a Python expert, you may want to skip this chapter now.

As you already might know, Python is the scripting language used in Blender to access objects and their data. You might want to use Python when:

Python is widely used in the scientific world, for more references and also the official documentation see  http://www.python.org

A python script inside Blender is normally invoked by the built in Text editor, pressing the hotkey 'ALT-P'. Usually, the first line of the script contains the following command:
 

import Blender
This loads the built in module 'Blender' which provides all the necessary sub modules and functions to access Blender objects.
Because of historical reasons, there are two different modules providing an interface to Blender. We recommend using the first one, the second one is for now (as of Blender 2.14) kept for compatibility.
For more information on these two APIs see below.

'Old' and 'New' API

The terminology often used for the two APIs is: Not enough of confusion, there is also an API specific to the GameEngine with different commands. This appears quite chaotic which we want to apologize for.  For the reasons of all these different APIs see below

Documentation for the Python API <2.04
Documentation for the Python API  2.10
 

Usage

Depending on which API you want to use, you have to import the modules listed in the table below:
 
API module name(s)
'old' API (<2.04) Blender
'new' API (2.10-2.12) Blender210
GameEngine API GameLogic

We are aware of the lack of documentation/tutorials at this moment because of lacking manpower on one hand and the unfinished state of the Python API on the other. But there are many example scripts demonstrating features for download at

http://www.blender.nl/resource/python/index.php

Future

unknown :-)

FAQ